aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMLogger.h
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-08-05 13:58:05 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-08-05 13:58:05 -0400
commitecdb1b2b710e30315c1d77ccbea961db64287c00 (patch)
tree7743f15f96a94e879fdb071f01161279f8bec35f /Foundation/GTMLogger.h
parent5b9fc43f5bc840ea1badd96744f9dae50ce039b1 (diff)
Make GTMLogLevelFilter use KVO on GTMVerboseLogging in sharedUserDefaults
This avoids checking if verbose logging is enabled on every user defaults change, and only does so when the verbose logging key changes. In sampling a few apps, this showed up as a hit when the app changes default (directly or via the System frameworks storing things). By using KVO for it it basically disappears from the samples.
Diffstat (limited to 'Foundation/GTMLogger.h')
-rw-r--r--Foundation/GTMLogger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Foundation/GTMLogger.h b/Foundation/GTMLogger.h
index a776922..16f0eaf 100644
--- a/Foundation/GTMLogger.h
+++ b/Foundation/GTMLogger.h
@@ -457,6 +457,7 @@ typedef enum {
@interface GTMLogLevelFilter : NSObject <GTMLogFilter> {
@private
BOOL verboseLoggingEnabled_;
+ NSUserDefaults *userDefaults_;
}
@end // GTMLogLevelFilter