From 2231dcbce3286ba38128050aabefd86590a6dd38 Mon Sep 17 00:00:00 2001 From: cpfeiffer Date: Sat, 3 Oct 2015 22:30:11 +0200 Subject: [PATCH] Log GB's version --- .../nodomain/freeyourgadget/gadgetbridge/GBApplication.java | 5 +++++ 1 file changed, 5 insertions(+) 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; }