diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java index e3cb2d6f..72f91be2 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBApplication.java @@ -77,6 +77,7 @@ public class GBApplication extends Application { File dir = FileUtils.getExternalFilesDir(); // used by assets/logback.xml since the location cannot be statically determined System.setProperty("GB_LOGFILES_DIR", dir.getAbsolutePath()); + getLogger().info("Gadgetbridge version: " + BuildConfig.VERSION_NAME); } catch (IOException ex) { Log.e("GBApplication", "External files dir not available, cannot log to file, ex"); System.setProperty("GB_LOGFILES_DIR", "/dev/null"); @@ -92,6 +93,10 @@ public class GBApplication extends Application { } } + private Logger getLogger() { + return LoggerFactory.getLogger(GBApplication.class); + } + public static Context getContext() { return context; }