3
File file = 
HyperLog.getDeviceLogsInFile(this);
    HyperLog.setURL("url");
    HyperLog.pushLogs(this, file.getAbsolutePath(), false, new HLCallback() {
        @Override
        public void onSuccess(@NonNull Object response) {

            Log.d("HYPERLOG", "onSuccess: called");
        }

        @Override
        public void onError(@NonNull HLErrorResponse HLErrorResponse) {
            Log.d("HYPERLOG", "onError: called");

  MiscUtilities.sendErrorReportToCrashAnalytics("onErrorCalled"+HLErrorResponse.getErrorCode());
        }
    });`

and I am initializing the hyper logs in my Base Application like this

    HyperLog.initialize(this);
    HyperLog.setLogLevel(Log.VERBOSE);

can anyone tell me what's wrong I am doing here ??

1 Answers1

0

Due to below statement logs are already written to file so after this statement if you call pushLogs() API then no logs will be available to push. File file = HyperLog.getDeviceLogsInFile(this);

Otherwise call File file = HyperLog.getDeviceLogsInFile(this,false); so on file write it will not delete logs from DB and call to pushLogs() will push logs to server.

Sagar
  • 21
  • 3