Re: Leave NSLog()s in Final Product?
Re: Leave NSLog()s in Final Product?
- Subject: Re: Leave NSLog()s in Final Product?
- From: Shaun Wexler <email@hidden>
- Date: Sat, 13 Mar 2004 12:48:13 -0800
On Mar 13, 2004, at 10:30 AM, Chris Hanson wrote:
Yes, they log to console. This means your application, every time it
runs, will generate reams of information in the user's console, which
is generally impolite.
MacFOH keeps its own log file in ~/Library/Logs. I think that is much
nicer, and certainly handy for me as a developer.
A better idea might be to switch to Bob Frank's Log4Cocoa framework
<http://log4cocoa.sourceforge.net/>. You can leave your logging in
your code and have whether or not logging is on, what level of logging
is desired, and where the log should go (console, a file, etc.)
configured via some user defaults that are normally off.
I wrote my own snappy little framework for logging: SKWLog. It
captures stderr output, and keeps the per-session data while appending
to the application's log file, all with one background thread. That
way, NSLog() doesn't slow down an application, AFAIK. You can also
write directly to SKWLog, avoiding the NSLog overhead. It also
provides a shared NSWindow and/or a shared NSPanel, and other windows.
It's Panther-only, as it was first created to play with NSOutputStream,
and it relies on several new 10.3 features.
http://www.skwdev.com/developer/frameworks/SKWLog.dmg
Free for development purposes. If you use it in a shipping product,
add a credit and send me a copy! There is an example application Xcode
project included, which kicks the tires, but it's quite customizable.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.