This commit is contained in:
Milos Kozak 2017-08-13 20:31:45 +02:00
commit a49a496651
3 changed files with 6 additions and 1 deletions

View file

@ -6,7 +6,7 @@
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover. Make sure the path matches the one in the file element or else
the rollover logs are placed in the working directory. -->
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
<fileNamePattern>${EXT_FILES_DIR}/AndroidAPS._%d{yyyy-MM-dd}_%d{HH-mm-ss, aux}_.%i.zip</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>5MB</maxFileSize>

View file

@ -10,6 +10,8 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.support.v7.app.NotificationCompat;
import com.crashlytics.android.answers.Answers;
import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.json.JSONException;
@ -277,6 +279,7 @@ public class LoopPlugin implements PluginBase {
@Override
public void run() {
final PumpEnactResult applyResult = configBuilder.applyAPSRequest(resultAfterConstraints);
Answers.getInstance().logCustom(new CustomEvent("APSRequest"));
if (applyResult.enacted || applyResult.success) {
lastRun.setByPump = applyResult;
lastRun.lastEnact = lastRun.lastAPSRun;

View file

@ -201,6 +201,7 @@ public class NSSettingsStatus {
private String getStringOrNull(String key) {
String ret = null;
if(data == null) return null;
if (data.has(key)) {
try {
ret = data.getString(key);
@ -309,6 +310,7 @@ public class NSSettingsStatus {
public JSONObject extentendedPumpSettings() {
try {
JSONObject extended = getExtendedSettings();
if(extended == null) return null;
if (extended.has("pump")) {
JSONObject pump = extended.getJSONObject("pump");
return pump;