I'm using CocoaLumberjack in an iPhone project, to log some information.
I've followed the Getting started guide, and everything works fine, but there is one thing that bugs me: there doesn't seem to be an elegant way to define a log level for the whole app. To make it work I need to define a constant in every source file, like this:
static const int ddLogLevel = LOG_LEVEL_VERBOSE;
So, is there a way to define a global log level for the application?
I found this article on the subject, but I still need to add an #import in every file...
There is a file called `CocoaLumberjack. swift`, drag that file into the `Pods` project, I suggest into the `Pods/CocoaLumberjack/Default` group. When XCode gives you options for adding the files make sure to leave `Copy items if needed` unchecked.
CocoaLumberjack is one of the most popular logging frameworks available for iOS development and testing. It is specifically designed for advanced development practices and that's why it is not the easiest option for first timers.
You could use an #include
statement in your *.pch file so that it's automatically included in all your project's files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With