Use Timber for all logs

This commit is contained in:
moezbhatti
2019-06-09 23:53:51 -04:00
parent c4a49a73d5
commit e1c26d055c
59 changed files with 505 additions and 858 deletions
@@ -23,15 +23,14 @@ import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.widget.Toast;
import com.klinker.android.logger.Log;
import org.jetbrains.annotations.Nullable;
import timber.log.Timber;
/**
* @hide
*/
public final class SqliteWrapper {
private static final String TAG = "SqliteWrapper";
private static final String SQLITE_EXCEPTION_DETAIL_MESSAGE
= "unable to open database file";
@@ -59,7 +58,7 @@ public final class SqliteWrapper {
try {
return resolver.query(uri, projection, selection, selectionArgs, sortOrder);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when query: ", e);
Timber.e(e, "Catch a SQLiteException when query: ");
checkSQLiteException(context, e);
return null;
}
@@ -70,7 +69,7 @@ public final class SqliteWrapper {
try {
return resolver.update(uri, values, where, selectionArgs);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when update: ", e);
Timber.e(e, "Catch a SQLiteException when update: ");
checkSQLiteException(context, e);
return -1;
}
@@ -81,7 +80,7 @@ public final class SqliteWrapper {
try {
return resolver.delete(uri, where, selectionArgs);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when delete: ", e);
Timber.e(e, "Catch a SQLiteException when delete: ");
checkSQLiteException(context, e);
return -1;
}
@@ -92,7 +91,7 @@ public final class SqliteWrapper {
try {
return resolver.insert(uri, values);
} catch (SQLiteException e) {
Log.e(TAG, "Catch a SQLiteException when insert: ", e);
Timber.e(e, "Catch a SQLiteException when insert: ");
checkSQLiteException(context, e);
return null;
}