diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBAccess.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBAccess.java index 7def569ba..aa8771167 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBAccess.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/database/DBAccess.java @@ -20,11 +20,16 @@ import android.content.Context; import android.os.AsyncTask; import android.widget.Toast; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import nodomain.freeyourgadget.gadgetbridge.GBApplication; import nodomain.freeyourgadget.gadgetbridge.R; import nodomain.freeyourgadget.gadgetbridge.util.GB; public abstract class DBAccess extends AsyncTask { + private static final Logger LOG = LoggerFactory.getLogger(DBAccess.class); + private final String mTask; private final Context mContext; private Exception mError; @@ -45,6 +50,7 @@ public abstract class DBAccess extends AsyncTask { try (DBHandler db = GBApplication.acquireDB()) { doInBackground(db); } catch (Exception e) { + LOG.error("Error during DBAccess for {}", mTask, e); mError = e; } return null;