From e9f8862776876a562fce5e80160694fb0e3e6c2a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 11 Sep 2018 14:27:38 +0200 Subject: [PATCH] maintenance plugin logging --- .../androidaps/plugins/Maintenance/ImportExportPrefs.java | 3 ++- .../nightscout/androidaps/plugins/Maintenance/LoggerUtils.java | 3 ++- .../androidaps/plugins/Maintenance/MaintenancePlugin.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/ImportExportPrefs.java b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/ImportExportPrefs.java index 06fde217f5..d7172cec97 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/ImportExportPrefs.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/ImportExportPrefs.java @@ -28,6 +28,7 @@ import java.util.Map; import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.R; import info.nightscout.androidaps.events.EventAppExit; +import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; import info.nightscout.utils.OKDialog; import info.nightscout.utils.ToastUtils; @@ -37,7 +38,7 @@ import info.nightscout.utils.ToastUtils; */ public class ImportExportPrefs { - private static Logger log = LoggerFactory.getLogger(ImportExportPrefs.class); + private static Logger log = LoggerFactory.getLogger(L.CORE); static File path = new File(Environment.getExternalStorageDirectory().toString()); static public final File file = new File(path, MainApp.gs(R.string.app_name) + "Preferences"); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/LoggerUtils.java b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/LoggerUtils.java index 3be97056c5..fc1cc0362a 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/LoggerUtils.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/LoggerUtils.java @@ -4,13 +4,14 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ch.qos.logback.classic.LoggerContext; +import info.nightscout.androidaps.logging.L; /** * This class provides serveral methods for log-handling (eg. sending logs as emails). */ public class LoggerUtils { - private static final Logger LOGGER = LoggerFactory.getLogger(LoggerUtils.class); + private static final Logger LOGGER = LoggerFactory.getLogger(L.CORE); public static String SUFFIX = ".log.zip"; diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/MaintenancePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/MaintenancePlugin.java index 3fd3745f42..02b8349332 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/MaintenancePlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Maintenance/MaintenancePlugin.java @@ -27,12 +27,13 @@ import info.nightscout.androidaps.R; import info.nightscout.androidaps.interfaces.PluginBase; import info.nightscout.androidaps.interfaces.PluginDescription; import info.nightscout.androidaps.interfaces.PluginType; +import info.nightscout.androidaps.logging.L; import info.nightscout.androidaps.plugins.NSClientInternal.data.NSSettingsStatus; import info.nightscout.utils.SP; public class MaintenancePlugin extends PluginBase { - private static final Logger LOG = LoggerFactory.getLogger(MaintenancePlugin.class); + private static final Logger LOG = LoggerFactory.getLogger(L.CORE); private final Context ctx;