Have NSDebugLog() and NSDebugLLog()

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2901 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1998-08-04 12:27:57 +00:00
parent 3082ca5f8a
commit 40241d9ba9
2 changed files with 8 additions and 4 deletions

View file

@ -78,11 +78,15 @@ extern const char* GSDebugAllocationList(BOOL changeFlag);
#ifdef DEBUG
#include <Foundation/NSDebug.h>
#include <Foundation/NSProcessInfo.h>
#define NSDebugLog(level, format, args...) \
#define NSDebugLLog(level, format, args...) \
do { if ([[[NSProcessInfo processInfo] debugArray] containsObject: level]) \
NSLog(format, ## args); } while (0)
#define NSDebugLog(format, args...) \
do { if ([[[NSProcessInfo processInfo] debugArray] containsObject: @"dflt"]) \
NSLog(format, ## args); } while (0)
#else
#define NSDebugLog(level, format, args...)
#define NSDebugLLog(level, format, args...)
#define NSDebugLog(format, args...)
#endif
#endif

View file

@ -256,7 +256,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
if ([s isEqual: gnustep_target_cpu])
path = [path stringByDeletingLastPathComponent];
NSDebugLog(@"NSBundle", @"(NSBundle): Found main in %@\n", path);
NSDebugLLog(@"NSBundle", @"(NSBundle): Found main in %@\n", path);
/* We do alloc and init separately so initWithPath: knows
we are the _mainBundle */
_mainBundle = [NSBundle alloc];
@ -339,7 +339,7 @@ _bundle_load_callback(Class theClass, Category *theCategory)
if (stat([path cString], &statbuf) != 0)
{
NSDebugLog(@"NSBundle", @"Could not access path %s for bundle", [path cString]);
NSDebugLLog(@"NSBundle", @"Could not access path %s for bundle", [path cString]);
//[self dealloc];
//return nil;
}