diff --git a/app/src/main/assets/logback.xml b/app/src/main/assets/logback.xml index 97e09b3e4d..d6facdb7dd 100644 --- a/app/src/main/assets/logback.xml +++ b/app/src/main/assets/logback.xml @@ -1,6 +1,6 @@ - + ${EXT_FILES_DIR}/AndroidAPS.log diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java index 711261ca36..455c599c35 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainApp.java +++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java @@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.ArrayList; +import ch.qos.logback.classic.LoggerContext; import info.nightscout.androidaps.Services.Intents; import info.nightscout.androidaps.db.DatabaseHelper; import info.nightscout.androidaps.interfaces.InsulinInterface; @@ -201,7 +202,9 @@ public class MainApp extends Application { } }).start(); - File engineeringModeSemaphore = new File(System.getProperty("EXT_FILES_DIR"),"engineering_mode"); + LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); + String extFilesDir = lc.getProperty("EXT_FILES_DIR"); + File engineeringModeSemaphore = new File(extFilesDir,"engineering_mode"); engineeringMode = engineeringModeSemaphore.exists() && engineeringModeSemaphore.isFile(); devBranch = BuildConfig.VERSION.contains("dev");