Crash reports in firebase don't log regular logs without checking
I am using firebase crash in my cordova application and I want to write all logs (Log.e) in my application as follows.
Login => {"userName" : "jhon" , "networkConnection": "on" ,
"status":"success"}
AddContact => {"userName" : "jhon" , "networkConnection": "on" ,
"status":"success", "contactId" :"3233"}
But I noticed one thing: if my application crashes, then only I can see the logs without it, I don't see the usual logs when the application does not crash.
For example,
In the following code
If I call explicitly FirebaseCrash.report(new Exception(name));
, then only the firebase crash report appears FirebaseCrash.logcat(Log.ERROR, name, params + " "+message);
.
If I only write FirebaseCrash.report(new Exception(name));
, but only FirebaseCrash.logcat(Log.ERROR, name, params + " "+message);
, these logs do not go to the server.
private void logCrash(final CallbackContext callbackContext, final String name, final String params,final String message){
cordova.getThreadPool().execute(new Runnable() {
@Override
public void run() {
FirebaseCrash.logcat(Log.ERROR, name, params + " "+message);
FirebaseCrash.report(new Exception(name));
}
});
callbackContext.success();
}
source to share
No one has answered this question yet
Check out similar questions: