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 09ab7feee1..c73a5160ac 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 @@ -73,8 +73,8 @@ public class MaintenancePlugin extends PluginBase { } public void sendLogs() { - String recipient = SP.getString("key_maintenance_logs_email", "logs@androidaps.org"); - int amount = SP.getInt("key_maintenance_logs_amount", 2); + String recipient = SP.getString(R.string.key_maintenance_logs_email, "logs@androidaps.org"); + int amount = SP.getInt(R.string.key_maintenance_logs_amount, 2); String logDirectory = LoggerUtils.getLogDirectory(); List logs = this.getLogfiles(logDirectory, amount); @@ -103,7 +103,7 @@ public class MaintenancePlugin extends PluginBase { Arrays.sort(files, (f1, f2) -> f1.getName().compareTo(f2.getName())); List delFiles = Arrays.asList(files); - int amount = SP.getInt("key_logshipper_amount", 2); + int amount = SP.getInt(R.string.key_logshipper_amount, 2); int keepIndex = amount - 1; if (keepIndex < delFiles.size()) { @@ -213,6 +213,10 @@ public class MaintenancePlugin extends PluginBase { builder.append("ADD TIME OF EVENT HERE: " + System.lineSeparator()); builder.append("ADD ISSUE DESCRIPTION OR GITHUB ISSUE REFERENCE NUMBER: " + System.lineSeparator()); builder.append("-------------------------------------------------------" + System.lineSeparator()); + builder.append("(Please remember this will send only very recent logs." + System.lineSeparator()); + builder.append("If you want to provide logs for event older than a few hours," + System.lineSeparator()); + builder.append("you have to do it manually)" + System.lineSeparator()); + builder.append("-------------------------------------------------------" + System.lineSeparator()); builder.append(MainApp.gs(R.string.app_name) + " " + BuildConfig.VERSION + System.lineSeparator()); if (Config.NSCLIENT) builder.append("NSCLIENT" + System.lineSeparator()); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 520a8f5f58..9feaff5e6c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1172,9 +1172,10 @@ Treatment data incomplete Maintenance Settings Email - email + maintenance_logs_email Invalid Email - amount of logs to send + maintenance_logs_amount + logshipper_amount No of Logs to send Maintenance MAINT