discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSLog and syslog, NSBundle messages


From: Jeff Teunissen
Subject: NSLog and syslog, NSBundle messages
Date: Wed, 05 Jun 2002 02:44:38 -0400

When logging to syslog, GNUstep still adds the date/time information,
which makes the system logs...interesting. Attached is a patch to handle
this case.

Also attached is a patch for NSBundleAdditions to downgrade the log
message when a nib is loaded, to a debug log message -- since it's not
particularly interesting unless you're trying to debug it. :)

-- 
| Jeff Teunissen  -=-  Pres., Dusk To Dawn Computing  -=-  deek @ d2dc.net
| GPG: 1024D/9840105A   7102 808A 7733 C2F3 097B  161B 9222 DAB8 9840 105A
| Core developer, The QuakeForge Project        http://www.quakeforge.net/
| Specializing in Debian GNU/Linux              http://www.d2dc.net/~deek/
--- base/Source/NSLog.m 27 May 2002 14:03:10 -0000      1.33
+++ base/Source/NSLog.m 29 May 2002 14:18:40 -0000
@@ -135,7 +135,12 @@
   pid = (int)getpid();
 #endif
 
-  prefix = [NSString
+#ifdef HAVE_SYSLOG
+  if (GSUserDefaultsFlag(GSLogSyslog) == YES)
+    prefix = @"";
+  else
+#endif
+    prefix = [NSString
             stringWithFormat: @"%@ %@[%d] ",
             [[NSCalendarDate calendarDate] 
               descriptionWithCalendarFormat: @"%Y-%m-%d %H:%M:%S.%F"],
--- gui/Source/NSBundleAdditions.m      11 Apr 2002 23:11:06 -0000      1.32
+++ gui/Source/NSBundleAdditions.m      29 May 2002 14:19:04 -0000
@@ -270,7 +270,7 @@
                      owner: [context objectForKey: @"NSOwner"]];
     } 
 
-  NSLog(@"Loading Nib `%@'...\n", fileName);
+  NSDebugLog(@"Loading Nib `%@'...\n", fileName);
   NS_DURING
     {
       NSData   *data = [NSData dataWithContentsOfFile: fileName];

reply via email to

[Prev in Thread] Current Thread [Next in Thread]