I'm trying to implement CocoaLumberjack on my app as framework but I'm having some issues. Here is my implementation on my AppDelegate.h:
#import "AppDelegate.h"
#import <CocoaLumberjack/CocoaLumberjack.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[DDLog addLogger:[DDASLLogger sharedInstance]];
[DDLog addLogger:[DDTTYLogger sharedInstance]];
DDFileLogger *fileLogger = [[DDFileLogger alloc] init];
fileLogger.maximumFileSize = 1024 * 1024;
fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling
fileLogger.logFileManager.maximumNumberOfLogFiles = 7;
[DDLog addLogger:fileLogger];
DDLogWarn(@"blablabla");
DDLogError(@"Broken sprocket detected!");
DDLogVerbose(@"User selected file:%@ withSize:%u", @"temp/test/log.txt", 100000);
return YES;
}
In the app delegate has no issues. But in my ViewController:
- (void)viewDidLoad {
[super viewDidLoad];
DDLogError(@"something when wrong!!!"); // <-- implicit declaration of function is invalid in c99
}
Any of you knows what is wrong or any work around this error?
I'll really appreciate your help.