mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 21:58:53 +01:00
Use Timber for all logs
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user