Cleanup boolean algrabra, add method for environment retrieval from logcontexxt

This commit is contained in:
Markus M. May 2018-03-17 21:23:45 +01:00
parent 72e8e5fd05
commit 0d4e8772a9

View file

@ -202,8 +202,7 @@ public class MainApp extends Application {
}
}).start();
LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
String extFilesDir = lc.getProperty("EXT_FILES_DIR");
String extFilesDir = this.getLogDirectory();
File engineeringModeSemaphore = new File(extFilesDir,"engineering_mode");
engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile();
@ -380,7 +379,12 @@ public class MainApp extends Application {
}
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