discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSLog (on windows)


From: David Ayers
Subject: Re: NSLog (on windows)
Date: Wed, 30 Nov 2005 10:05:07 +0100
User-agent: Mozilla Thunderbird 1.0.2 (X11/20051002)

Lloyd Dupont schrieb:
> Just updated from CVS and, of course, the CVS version of NSLog.m still
> have this annoying behavior of writing every single NSLog output to the
> events log.
> Speaking of windows port that's very annoying for any end-user application.
> 
> Because otherwise, everytime I start my Application, my event log get
> flooded with dozen of entries like:
> 2005-11-30 00:56:43.000 NovaMindEditor.exe[5388] Starting resolution
> 
> I understand most of you UNIX minded guy like to write system service or
> server stuff like that. But for developer who are trying to write
> end-user (graphical) desktop application using GNUstep(!) this is quite
> inapropriate!

I agree that such logs are annoying but this is also the behavior of
OPENSTEP NT.  I believe one should reconsider carefully whether using
NSLog in release code for such debugging logs is appropriate.


> What about having this only in debug mode?
> Or some sort of flag to disable it?
> Or maybe create a new GNUstep event source named "GNUstep"?

Maybe you want to be using NSDebugLog.
There is documentation on how to tune or even replace the behavior of NSLog:

"GNUstep provides powerful alternatives for logging ... see
NSDebugLog()  , NSWarnLog()  and GSPrintf() for example. We recommend
the use of  NSDebugLog()  and its relatives for debug purposes, and
GSPrintf() for general log messages, with  NSLog()  being reserved for
reporting possible/likely errors. GSPrintf() is declared in
GSObjCRuntime.h."


http://www.gnustep.org/resources/documentation/Developer/Base/Reference/
http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Functions.html#function$NSLog
http://www.gnustep.org/resources/documentation/Developer/Base/Reference/TypesAndConstants.html#variable$_NSLog_printf_handler

http://www.gnustep.org/resources/documentation/Developer/Base/Reference/Functions.html#macro$NSDebugLog

Cheers,
David




reply via email to

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