mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-05 05:46:44 +00:00
initialise logger after configuring user defined application home
This commit is contained in:
parent
18bc7bf302
commit
d722c4972a
2 changed files with 8 additions and 6 deletions
2
drongo
2
drongo
|
@ -1 +1 @@
|
||||||
Subproject commit 05674097428d25de043310f8ecddf06d998b3943
|
Subproject commit 962253beaacfe36b5fb3261bae60b4e126406c19
|
|
@ -28,8 +28,6 @@ import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class MainApp extends Application {
|
public class MainApp extends Application {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MainApp.class);
|
|
||||||
|
|
||||||
public static final String APP_NAME = "Sparrow";
|
public static final String APP_NAME = "Sparrow";
|
||||||
public static final String APP_VERSION = "0.9.9";
|
public static final String APP_VERSION = "0.9.9";
|
||||||
public static final String APP_HOME_PROPERTY = "sparrow.home";
|
public static final String APP_HOME_PROPERTY = "sparrow.home";
|
||||||
|
@ -109,8 +107,8 @@ public class MainApp extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.dir != null) {
|
if(args.dir != null) {
|
||||||
log.info("Using configured Sparrow home folder of " + args.dir);
|
|
||||||
System.setProperty(APP_HOME_PROPERTY, args.dir);
|
System.setProperty(APP_HOME_PROPERTY, args.dir);
|
||||||
|
getLogger().info("Using configured Sparrow home folder of " + args.dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.network != null) {
|
if(args.network != null) {
|
||||||
|
@ -121,7 +119,7 @@ public class MainApp extends Application {
|
||||||
try {
|
try {
|
||||||
Network.set(Network.valueOf(envNetwork.toUpperCase()));
|
Network.set(Network.valueOf(envNetwork.toUpperCase()));
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
log.warn("Invalid " + NETWORK_ENV_PROPERTY + " property: " + envNetwork);
|
getLogger().warn("Invalid " + NETWORK_ENV_PROPERTY + " property: " + envNetwork);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,9 +130,13 @@ public class MainApp extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Network.get() != Network.MAINNET) {
|
if(Network.get() != Network.MAINNET) {
|
||||||
log.info("Using " + Network.get() + " configuration");
|
getLogger().info("Using " + Network.get() + " configuration");
|
||||||
}
|
}
|
||||||
|
|
||||||
com.sun.javafx.application.LauncherImpl.launchApplication(MainApp.class, MainAppPreloader.class, argv);
|
com.sun.javafx.application.LauncherImpl.launchApplication(MainApp.class, MainAppPreloader.class, argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static Logger getLogger() {
|
||||||
|
return LoggerFactory.getLogger(MainApp.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue