Where is Logfile stored using cocoaLumberjack

前端 未结 9 1028
不知归路
不知归路 2020-12-22 18:07

I am Using cocoaLumberjack logging framework for iOS logging. For storing logs in a file I used this code.

DDFileLogger* fileLogger = [[DDFileLogger alloc] i         


        
9条回答
  •  执念已碎
    2020-12-22 18:34

    Found this to be the latest:

    DDFileLogger *fileLogger = [[DDFileLogger alloc] init];
    
    fileLogger.logFileManager.logsDirectory;//THIS
    

    From the official code:

    Default log file manager.

    All log files are placed inside the logsDirectory. If a specific logsDirectory isn't specified, the default directory is used. On Mac, this is in ~/Library/Logs/. On iPhone, this is in ~/Library/Caches/Logs. Log files are named "log-.txt", where uuid is a 6 character hexadecimal consisting of the set [0123456789ABCDEF]. Archived log files are automatically deleted according to the maximumNumberOfLogFiles property.

提交回复
热议问题