aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMLogger+ASL.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-05-26 20:30:19 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2011-05-26 20:30:19 +0000
commit2f3ffbf853bee2e02d440d801f64064d61f80080 (patch)
treecf1ef54f8afced16be464132cfd234d1b6188432 /Foundation/GTMLogger+ASL.m
parent63df78497120f02b0aaa878497f2413db235e7a3 (diff)
[Author: aharper]
Logging doesn't get to call assert() or exit() even when its very sad. Logging isn't in charge of killing the process. Internal exceptions need catching too. Plus some minor cleanup along the way, and better handling of GTMVerboseLogging in the environment. R=dmaclach,thomasvl APPROVED=thomasvl
Diffstat (limited to 'Foundation/GTMLogger+ASL.m')
-rw-r--r--Foundation/GTMLogger+ASL.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/Foundation/GTMLogger+ASL.m b/Foundation/GTMLogger+ASL.m
index 435cec3..58bc710 100644
--- a/Foundation/GTMLogger+ASL.m
+++ b/Foundation/GTMLogger+ASL.m
@@ -112,6 +112,7 @@
level:(GTMLoggerLevel)level {
return [NSString stringWithFormat:@"%@ %@",
[self prettyNameForFunc:func],
+ // |super| has guard for nil |fmt| and |args|
[super stringForFunc:func withFormat:fmt valist:args level:level]];
}
@@ -127,7 +128,7 @@
- (id)initWithFacility:(NSString *)facility {
if ((self = [super init])) {
client_ = asl_open(NULL, [facility UTF8String], 0);
- if (client_ == nil) {
+ if (client_ == NULL) {
// COV_NF_START - no real way to test this
[self release];
return nil;
@@ -138,13 +139,13 @@
}
- (void)dealloc {
- if (client_) asl_close(client_);
+ if (client_ != NULL) asl_close(client_);
[super dealloc];
}
#if GTM_SUPPORT_GC
- (void)finalize {
- if (client_) asl_close(client_);
+ if (client_ != NULL) asl_close(client_);
[super finalize];
}
#endif