mirror of https://github.com/ThmmyNoLife/mTHMMY
Ezerous
8 years ago
6 changed files with 109 additions and 17 deletions
@ -0,0 +1,73 @@ |
|||
{ |
|||
"project_info": { |
|||
"project_number": "934432863001", |
|||
"firebase_url": "https://mthmmy-debug.firebaseio.com", |
|||
"project_id": "mthmmy-debug", |
|||
"storage_bucket": "mthmmy-debug.appspot.com" |
|||
}, |
|||
"client": [ |
|||
{ |
|||
"client_info": { |
|||
"mobilesdk_app_id": "1:934432863001:android:a921e0b04ab1f00b", |
|||
"android_client_info": { |
|||
"package_name": "gr.thmmy.mtmmy" |
|||
} |
|||
}, |
|||
"oauth_client": [ |
|||
{ |
|||
"client_id": "934432863001-d5oocs1vdi0pcepesi55a41p7enphfcv.apps.googleusercontent.com", |
|||
"client_type": 3 |
|||
} |
|||
], |
|||
"api_key": [ |
|||
{ |
|||
"current_key": "AIzaSyD4-gwVcb2Rc8zeT8l1v2Lg1DU0QgfGtk8" |
|||
} |
|||
], |
|||
"services": { |
|||
"analytics_service": { |
|||
"status": 1 |
|||
}, |
|||
"appinvite_service": { |
|||
"status": 1, |
|||
"other_platform_oauth_client": [] |
|||
}, |
|||
"ads_service": { |
|||
"status": 2 |
|||
} |
|||
} |
|||
}, |
|||
{ |
|||
"client_info": { |
|||
"mobilesdk_app_id": "1:934432863001:android:088be0537ff6b292", |
|||
"android_client_info": { |
|||
"package_name": "gr.thmmy.mthmmy" |
|||
} |
|||
}, |
|||
"oauth_client": [ |
|||
{ |
|||
"client_id": "934432863001-d5oocs1vdi0pcepesi55a41p7enphfcv.apps.googleusercontent.com", |
|||
"client_type": 3 |
|||
} |
|||
], |
|||
"api_key": [ |
|||
{ |
|||
"current_key": "AIzaSyD4-gwVcb2Rc8zeT8l1v2Lg1DU0QgfGtk8" |
|||
} |
|||
], |
|||
"services": { |
|||
"analytics_service": { |
|||
"status": 1 |
|||
}, |
|||
"appinvite_service": { |
|||
"status": 1, |
|||
"other_platform_oauth_client": [] |
|||
}, |
|||
"ads_service": { |
|||
"status": 2 |
|||
} |
|||
} |
|||
} |
|||
], |
|||
"configuration_version": "1" |
|||
} |
@ -1,67 +1,80 @@ |
|||
package mthmmy.utils; |
|||
|
|||
import android.util.Log; |
|||
import com.google.firebase.crash.FirebaseCrash; |
|||
|
|||
public class Report //TODO implement for release
|
|||
public class Report |
|||
{ |
|||
|
|||
public static void v (String TAG, String message) |
|||
{ |
|||
Log.v(TAG,message); |
|||
log("V", TAG, message); |
|||
} |
|||
|
|||
public static void v (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.v(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("V", TAG, message, tr); |
|||
} |
|||
|
|||
public static void d (String TAG, String message) |
|||
{ |
|||
Log.d(TAG,message); |
|||
log("D", TAG, message); |
|||
} |
|||
|
|||
public static void d (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.d(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("D", TAG, message, tr); |
|||
} |
|||
|
|||
public static void i (String TAG, String message) |
|||
{ |
|||
Log.i(TAG,message); |
|||
log("I", TAG, message); |
|||
} |
|||
|
|||
public static void i (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.i(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("I", TAG, message, tr); |
|||
} |
|||
|
|||
public static void w (String TAG, String message) |
|||
{ |
|||
Log.w(TAG,message); |
|||
log("W", TAG, message); |
|||
} |
|||
|
|||
public static void w (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.w(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("W", TAG, message, tr); |
|||
} |
|||
|
|||
public static void e (String TAG, String message) |
|||
{ |
|||
Log.e(TAG,message); |
|||
log("E", TAG, message); |
|||
} |
|||
|
|||
public static void e (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.e(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("E", TAG, message, tr); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message) |
|||
{ |
|||
Log.wtf(TAG,message); |
|||
log("WTF", TAG, message); |
|||
} |
|||
|
|||
public static void wtf (String TAG, String message, Throwable tr) |
|||
{ |
|||
Log.wtf(TAG,message + ": " + tr.getMessage(),tr); |
|||
exception("WTF", TAG, message, tr); |
|||
} |
|||
|
|||
private static void log(String level, String TAG, String message) |
|||
{ |
|||
FirebaseCrash.log(level + "/" + TAG + ": " + message); |
|||
} |
|||
|
|||
private static void exception(String level, String TAG, String message, Throwable tr) |
|||
{ |
|||
FirebaseCrash.log(level + "/" + TAG + ": " + message + ": " + tr.getMessage()); |
|||
FirebaseCrash.report(tr); |
|||
} |
|||
|
|||
|
|||
} |
Loading…
Reference in new issue