Adding ITDebug stuff to ease debug logging.
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Sat, 13 Sep 2003 01:48:55 +0000 (01:48 +0000)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Sat, 13 Sep 2003 01:48:55 +0000 (01:48 +0000)
ITDebug.h [new file with mode: 0755]
ITDebug.m [new file with mode: 0755]

diff --git a/ITDebug.h b/ITDebug.h
new file mode 100755 (executable)
index 0000000..2935b51
--- /dev/null
+++ b/ITDebug.h
@@ -0,0 +1,13 @@
+/*
+ *  ITDebug.h
+ *  ITFoundation
+ *
+ *  Created by Joseph Spiros on Fri Sep 12 2003.
+ *  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#import <Foundation/Foundation.h>
+
+void SetITDebugMode(BOOL mode);
+void ITDebugLog(NSString *format, ...);
diff --git a/ITDebug.m b/ITDebug.m
new file mode 100755 (executable)
index 0000000..e7fef2b
--- /dev/null
+++ b/ITDebug.m
@@ -0,0 +1,28 @@
+/*
+ *  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 = NO;
+
+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);
+    }
+}
\ No newline at end of file