Cleanup boolean algrabra, add method for environment retrieval from logcontexxt
This commit is contained in:
parent
72e8e5fd05
commit
0d4e8772a9
1 changed files with 7 additions and 3 deletions
|
@ -202,8 +202,7 @@ public class MainApp extends Application {
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
|
||||||
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
String extFilesDir = this.getLogDirectory();
|
||||||
String extFilesDir = lc.getProperty("EXT_FILES_DIR");
|
|
||||||
File engineeringModeSemaphore = new File(extFilesDir,"engineering_mode");
|
File engineeringModeSemaphore = new File(extFilesDir,"engineering_mode");
|
||||||
|
|
||||||
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
|
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
|
||||||
|
@ -380,7 +379,12 @@ public class MainApp extends Application {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDevModeOrRelease() {
|
public static boolean isDevModeOrRelease() {
|
||||||
return (devBranch && engineeringMode) || !devBranch;
|
return engineeringMode || !devBranch;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getLogDirectory() {
|
||||||
|
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
|
||||||
|
return lc.getProperty("EXT_FILES_DIR");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue