X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/cbf867ef1f43f83e21ee694cbc93e64e036b21b1..744612b5d258474e367710b870a5caaed7d11ab9:/ITDebug.m diff --git a/ITDebug.m b/ITDebug.m old mode 100755 new mode 100644 index 277f91a..578853c --- a/ITDebug.m +++ b/ITDebug.m @@ -1,28 +1,24 @@ -/* - * ITDebug.m - * ITFoundation - * - * Created by Joseph Spiros on Fri Sep 12 2003. - * Copyright (c) 2003 __MyCompanyName__. All rights reserved. - * - */ - #import "ITDebug.h" -static BOOL _ITDebugMode = YES; +NSString *ITDebugErrorPrefixForObject(id object) { + return [NSString stringWithFormat:@"[ERROR] %@(0x%x):", NSStringFromClass([object class]), object]; +} + +static BOOL _ITDebugMode = NO; + +BOOL ITDebugMode() { + return _ITDebugMode; +} -void SetITDebugMode (BOOL mode) -{ - _ITDebugMode = mode; +void SetITDebugMode(BOOL mode) { + _ITDebugMode = mode; } -void ITDebugLog (NSString *format, ...) -{ - if ( ( _ITDebugMode == YES ) ) { - va_list ap; - - va_start (ap, format); - NSLogv (format, ap); - va_end (ap); - } +void ITDebugLog(NSString *format, ...) { + if ( ( _ITDebugMode == YES ) ) { + va_list ap; + va_start (ap, format); + NSLogv (format, ap); + va_end (ap); + } } \ No newline at end of file