I want to set up logging which creates a new file once the original file exceeds 1MB, up to a maximum of 5 files.
The issue is that currently I'm seeing the log file far exceeds 1MB and doesn't create a new file.
I'm using Objective C with CocoaLumberjack installed from CocoaPods. Testing with iphone simulator.
This is my code:
DDFileLogger *fileLogger = [[DDFileLogger alloc] init];
[fileLogger setRollingFrequency:-1];
[fileLogger setMaximumFileSize:1024*1024];
[[fileLogger logFileManager] setMaximumNumberOfLogFiles:5];
[DDLog addLogger:fileLogger];
I can't see where I've gone wrong but can't see anyone experiencing similar issues recently so I don't think there's a bug around it. Can anyone shed some light for me? Could it be to do with the iphone simulator? I unfortunately don't have a device at hand to test it on.