firebase crash reporting does not logs normal logs without expection

Viewed 215

I am using firebase crash in my cordova application and I want to capture 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 have noticed one thing is that if my app gets crashed then only I am able to see logs without that I can't see the normal logs when I app do not crash.

For example ,

In following code

If I explicitly call FirebaseCrash.report(new Exception(name)); then only FirebaseCrash.logcat(Log.ERROR, name, params + " "+message); appears in firebase crash report.

If I only write FirebaseCrash.report(new Exception(name)); then only FirebaseCrash.logcat(Log.ERROR, name, params + " "+message); the these logs are not coming 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();


    }
0 Answers
Related