X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/5be1d5a0ca54fa66651b3536ad07702391e4d0fe..8e10b21b0ba4dc981faebcb359143b474309719b:/ITDebug.m?ds=sidebyside diff --git a/ITDebug.m b/ITDebug.m old mode 100755 new mode 100644 index e7fef2b..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" +NSString *ITDebugErrorPrefixForObject(id object) { + return [NSString stringWithFormat:@"[ERROR] %@(0x%x):", NSStringFromClass([object class]), object]; +} + static BOOL _ITDebugMode = NO; -void SetITDebugMode (BOOL mode) -{ - _ITDebugMode = mode; +BOOL ITDebugMode() { + return _ITDebugMode; +} + +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