0

I started using the Lumberjack logging framework. It requires an integer variable called ddLogLevel to be defined wherever I call one of the log macros. I could write

static const int ddLogLevel = LOG_LEVEL_INFO

at the top of every file to achieve this. However I'd prefer not to write anything, except the log macros, just as I would with NSLog. I can do this by defining the above variable in the prefix header of my project. The problem with this approach is, that if I want to use a different log level in some of my files, then I can't redeclare that static variable.

oguz ismail
  • 1
  • 16
  • 47
  • 69
DrummerB
  • 39,814
  • 12
  • 105
  • 142
  • Is there a windows version for lumberjack ? or something similar that can send logs created by nlog to logstash ? – dparkar May 16 '13 at 15:19

1 Answers1

5

Using DynamicLogLevels allows you to accomplish the task of assigning different log levels in different files. Check it out: https://github.com/robbiehanson/CocoaLumberjack/wiki/DynamicLogLevels.

user1807011
  • 96
  • 1
  • 2