#ifdef DEBUG
[DDLog addLogger:[DDTTYLogger sharedInstance] withLogLevel:LOG_LEVEL_DEBUG];
#endif
// Create the file logger.
DDFileLogger *fileLogger = [[DDFileLogger alloc] init];
// We only want to roll the log file when it reaches it's maximum size.
// We don't want to roll the log file after some time interval.
// I'm using the default maximum size of 1MByte.
fileLogger.rollingFrequency = 0;
// Only keep the last three log files.
fileLogger.logFileManager.maximumNumberOfLogFiles = 3;
[DDLog addLogger:fileLogger withLogLevel:LOG_LEVEL_INFO];