Re: Leave NSLog()s in Final Product?
Re: Leave NSLog()s in Final Product?
- Subject: Re: Leave NSLog()s in Final Product?
- From: Chris Hanson <email@hidden>
- Date: Sat, 13 Mar 2004 13:30:27 -0500
On Mar 12, 2004, at 9:26 AM, Jerry Krinock wrote:
Do these NSLog() calls do anything when an application is not launched
from
Terminal?
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.
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.
This way you can either add a couple (possibly hidden) preferences for
your application's logging features, leave all of your logging code in
the final product, and even make the logging information semantically
richer by using several different log levels.
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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.