First, can you update your queston to show what DDLog* calls you are using? That can help to confirm that you are using something that will actually get logged (or not) correctly.
Second, some of your example logs showing calls in release mode could help, too -- specially showing what class instances they are coming from.
So, are you only using DDLog in GeneratrTableViewController.m
? What you have will set the ddLogLevel static const variable only in GeneratrTableViewController.m
. (I'm assuming that's what I'm looking at, based on what the code looks like.) If you're using DDLog* calls in any other files, it'll use whatever the default log level is there.
UPDATE
Okay, your update helped me understand where you were at. You should not be setting it up like that for each class.
First, do it globally, add something like the following once to your precompiled header -- not every file, not ever header --
#ifdef DEBUG
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
static int ddLogLevel = LOG_LEVEL_DEBUG;
#pragma clang diagnostic pop
#else
static const int ddLogLevel = LOG_LEVEL_WARN;
#endif
The #pragma's to not warn on unused variables mask warnings that arise in the corner case where you're in DEBUG, but the variable happens not to be used because of lack of logging. The non-const in debug mode here is important -- if you want to override the level per class, you're going to need to be able to change it. But this has to happen dynamically.
For each class that you may want to override the logging setting in, you need something like the following (and still adding the above to your precompiled header).
+ (void)initialize
{
[self ddSetLogLevel:LOG_LEVEL_VERBOSE];
}
+ (int)ddLogLevel
{
return LOG_LEVEL_VERBOSE;
}
+ (void)ddSetLogLevel:(int)logLevel
{
ddLogLevel = logLevel;
}
I tend to keep my global level at DEBUG (in DEBUG mode). Then I add the code directly above to classes when I'm actively developing them and use DDLogVerbose liberally. Then, when main dev is done, I wrap it in #if 0/#endif
so I can easily add it back in later; changing the global setting would also work just fine.