umair13adil / flutter_logs

An extensive logging framework developed for flutter apps.
https://itnext.io/sending-logs-from-flutter-apps-in-real-time-using-elk-stack-mqtt-c24fa0cb9802
Apache License 2.0
40 stars 32 forks source link

can't extract logs to file on IOS 14.3 #3

Open hungbu opened 3 years ago

hungbu commented 3 years ago

i am test on IOS 14.3

init
await FlutterLogs.initLogs(
      logLevelsEnabled: [
        LogLevel.INFO,
        LogLevel.WARNING,
        LogLevel.ERROR,
        LogLevel.SEVERE
      ],
      timeStampFormat: TimeStampFormat.TIME_FORMAT_READABLE,
      directoryStructure: DirectoryStructure.FOR_DATE,
      logTypesEnabled: ["device", "network", "errors"],
      logFileExtension: LogFileExtension.LOG,
      logsWriteDirectoryName: "workspaceLogs",
      logsExportDirectoryName: "workspaceLogs/Exported",
      debugFileOperations: true,
      isDebuggable: true);

add logs test:

FlutterLogs.logInfo(TAG, "DebugScreen", "setUpLogs: Setting up logs..");

save file

    var now = new DateTime.now();
    var formatter = new DateFormat('ddMMyH');
    String formattedDate = formatter.format(now);
    String logName = formattedDate;
    print(formattedDate);
    FlutterLogs.logToFile(
        logFileName: logName,
        overwrite: true,
        //If set 'true' logger will append instead of overwriting
        logMessage:
            "This is a log message: ${DateTime.now().millisecondsSinceEpoch}, it will be saved to my log file named: ",
        appendTimeStamp: true);

but no file any