Re: Leave NSLog()s in Final Product? - solution
Re: Leave NSLog()s in Final Product? - solution
- Subject: Re: Leave NSLog()s in Final Product? - solution
- From: Chaz McGarvey <email@hidden>
- Date: Tue, 16 Mar 2004 22:41:10 -0700
On Mar 16, 2004, at 9:48 PM, Jerry Krinock wrote:
on 04/03/13 10:30, Chris Hanson at email@hidden wrote:
A better idea might be to switch to Bob Frank's Log4Cocoa framework
<http://log4cocoa.sourceforge.net/>
I looked at this and decided that I did not want to embed such a huge,
"full-featured" logger in my little application. So I wrote these two
functions to use instead of NSLog. They have a couple neat tricks in
them,
so I thought I'd post them here.
The first one takes a C string, and the second takes an NSString, (for
Obj-C
gurus who can't type a string constant any more without the "@"
prefix).
[snip]
These functions look pretty much the same as the ones I wrote only mine
are even a bit simpler. I've discovered that I don't want to have to
hassle with log 'priorities' (or don't really care), so my functions
are controlled by a global boolean value, which is set by one control
function. Either I want to see log messages or I don't. This works
well for me since I know for sure that I don't want any debug
information to be printed to the console. Plus it would be easy to
enable logging as a result of command-line parameters or user defaults.
And life is good and simple. But your solution is great if you need
priorities.
Chaz McGarvey
http://www.brokenzipper.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.