I've a scenario where I want to force the log file to roll out (synchronously) even before the maxfilesize is reached so that I can upload the log to the server. I do see this public method rollLogFile that I can call. But this method puts the rollLogFileNow method call(which actually rolls the log files) on an asynchronous queue. But, I want to roll out the log file synchronously as and when I need to, so that once it's rolled out I can upload the file to the server. Can someone please let me know how this can be done? I'm e newbie in using Lumberjack framework.
Asked
Active
Viewed 617 times
2 Answers
0
There is a method available on DDFileLogger
that allows you to pass a block to be executed upon completion of the rollover.
[DDFileLogger rollLogFileWithCompletionBlock:(nullable void (^)(void))completionBlock)];

Sandeep Phadke
- 862
- 9
- 23