From 2f3ffbf853bee2e02d440d801f64064d61f80080 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 26 May 2011 20:30:19 +0000 Subject: [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 --- Foundation/GTMLogger+ASL.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Foundation/GTMLogger+ASL.m') 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 -- cgit v1.2.3