diff --git a/Documentation/DynamicLogLevels.md b/Documentation/DynamicLogLevels.md index 98a70dec..87c3b40c 100644 --- a/Documentation/DynamicLogLevels.md +++ b/Documentation/DynamicLogLevels.md @@ -4,7 +4,7 @@ Dynamically changing log levels during run-time When you define your log level, you generally define it in a manner similar to this: ```objc -static const DDLogLevel ddLogLevel = DDLogLevelWarn; +static const DDLogLevel ddLogLevel = DDLogLevelWarning; ``` What this means is that your log level is declared as a constant. It cannot be changed. @@ -13,7 +13,7 @@ This has the advantage that the compiler can automatically prune `DDLog` stateme To allow a dynamic log level, all we need to do is remove the "const" part: ```objc -static DDLogLevel ddLogLevel = DDLogLevelWarn; +static DDLogLevel ddLogLevel = DDLogLevelWarning; ``` This means that we can change the log level when/how we want. For example, maybe we're debugging some specific part of our application. @@ -24,7 +24,7 @@ This means that we can change the log level when/how we want. For example, maybe } - (void)taskDidFinish { - ddLogLevel = DDLogLevelWarn; + ddLogLevel = DDLogLevelWarning; } ``` @@ -45,7 +45,7 @@ defaults write com.myapp.prefsLogLevel 4 And in your preference pane code, you have something like this: ```objc -static DDLogLevel ddLogLevel = DDLogLevelWarn; +static DDLogLevel ddLogLevel = DDLogLevelWarning; + (void)initialize { NSNumber *logLevel = [[NSUserDefaults standardUserDefaults] objectForKey:@"prefsLogLevel"]; @@ -75,7 +75,7 @@ The lumberjack framework has something called "registered dynamic logging". Here #import "Sprocket.h" #import "DDLog.h" -static DDLogLevel ddLogLevel = DDLogLevelWarn; +static DDLogLevel ddLogLevel = DDLogLevelWarning; @implementation Sprocket diff --git a/Documentation/GettingStarted.md b/Documentation/GettingStarted.md index b805155e..5682d843 100644 --- a/Documentation/GettingStarted.md +++ b/Documentation/GettingStarted.md @@ -150,7 +150,7 @@ Which log level you choose per NSLog statement depends, of course, on the severi These tie into the log level just as you would expect - If you set the log level to DDLogLevelError, then you will only see Error statements. -- If you set the log level to DDLogLevelWarn, then you will only see Error and Warn statements. +- If you set the log level to DDLogLevelWarning, then you will only see Error and Warn statements. - If you set the log level to DDLogLevelInfo, you'll see Error, Warn and Info statements. - If you set the log level to DDLogLevelDebug, you'll see Error, Warn, Info and Debug statements. - If you set the log level to DDLogLevelVerbose, you'll see all DDLog statements. diff --git a/Documentation/PerUserLogLevels.md b/Documentation/PerUserLogLevels.md index de96fd33..4251fad8 100644 --- a/Documentation/PerUserLogLevels.md +++ b/Documentation/PerUserLogLevels.md @@ -11,7 +11,7 @@ A better solution is using **per-user** log levels: #elif defined(DEBUG) static const DDLogLevel ddLogLevel = DDLogLevelInfo; // Log level for other team members (debug) #else - static const DDLogLevel ddLogLevel = DDLogLevelWarn; // Log level for release build + static const DDLogLevel ddLogLevel = DDLogLevelWarning; // Log level for release build #endif ```