Search in sources :

Example 1 with LogFileManager

use of com.google.firebase.crashlytics.internal.log.LogFileManager in project GreenHouse by utsanjan.

the class CrashlyticsController method finalizePreviousNativeSession.

private void finalizePreviousNativeSession(String previousSessionId) {
    Logger logger = Logger.getLogger();
    logger.d("Finalizing native report for session " + previousSessionId);
    NativeSessionFileProvider nativeSessionFileProvider = this.nativeComponent.getSessionFileProvider(previousSessionId);
    File minidumpFile = nativeSessionFileProvider.getMinidumpFile();
    if (minidumpFile == null || !minidumpFile.exists()) {
        Logger logger2 = Logger.getLogger();
        logger2.w("No minidump data found for session " + previousSessionId);
        return;
    }
    LogFileManager previousSessionLogManager = new LogFileManager(this.context, this.logFileDirectoryProvider, previousSessionId);
    File nativeSessionDirectory = new File(getNativeSessionFilesDir(), previousSessionId);
    if (!nativeSessionDirectory.mkdirs()) {
        Logger.getLogger().d("Couldn't create native sessions directory");
        return;
    }
    List<NativeSessionFile> nativeSessionFiles = getNativeSessionFiles(nativeSessionFileProvider, previousSessionId, getContext(), getFilesDir(), previousSessionLogManager.getBytesForLog());
    NativeSessionFileGzipper.processNativeSessions(nativeSessionDirectory, nativeSessionFiles);
    this.reportingCoordinator.finalizeSessionWithNativeEvent(makeFirebaseSessionIdentifier(previousSessionId), nativeSessionFiles);
    previousSessionLogManager.clearLog();
}
Also used : NativeSessionFileProvider(com.google.firebase.crashlytics.internal.NativeSessionFileProvider) Logger(com.google.firebase.crashlytics.internal.Logger) File(java.io.File) LogFileManager(com.google.firebase.crashlytics.internal.log.LogFileManager)

Aggregations

Logger (com.google.firebase.crashlytics.internal.Logger)1 NativeSessionFileProvider (com.google.firebase.crashlytics.internal.NativeSessionFileProvider)1 LogFileManager (com.google.firebase.crashlytics.internal.log.LogFileManager)1 File (java.io.File)1