Re: toggling NSlog for framework
Re: toggling NSlog for framework
- Subject: Re: toggling NSlog for framework
- From: Arturo Perez <email@hidden>
- Date: Wed, 26 May 2004 13:05:35 -0400
Hi Chuck,
Here's my situation. I have my main WOApplication which does a fair
amount of SQL. I also link in a framework (homegrown) that does a lot
of SQL on its own.
At this point, I'm happy with the framework and I trust that it's doing
the correct thing. When I want to debug the SQL for the application I
turn on adaptor logging with the command line option. Now my log is
filled with stuff from the framework.
I took a glance at the NSLog logging groups stuff. But it looked like a
lot of work to get what I want; essentially I would like lots of debug
groups. I guess I'm used to syslog and other logging systems that where
the logging statement is of the form
log(<FACILITY>, <LEVEL>, "msg");
but NSLog requires
if (NSLog.debugLoggingAllowedFor...(FACILITY) &&
NSLog.debugLoggingAllowedFor...(LEVEL))
NSLog.out(msg);
which is a headache bordering on migraine. I realize that there will be
a performance issue if you don't do it NSLog's way. That limits the
possibilities quite a bit. No macros in Java makes it that much more
annoying. Running all the code through M4 would be pesky.
I guess I'm asking for a best implementation approach to logging. On
its own, NSLog is a fine point of departure. But it's not sufficient.
I have, in the distant past, created logging facilities that enabled
debugging of complex applications just by reviewing a trace file. I
can't see being successful to the same degree at that with NSLog.
Maybe I'm just a whinging git :-)
-arturo
Chuck Hill wrote:
Hi Arturo,
I'm not clear on what you are trying to achieve. You want to not log
for a certain sub-set of entities? Would it be easier to turn logging
on and off around the pieces of code that you *do* want logging from?
Chuck
On May 25, 2004, at 10:09 AM, Arturo Pirez wrote:
Hi all,
I have a framework with its own EOModel. I would like to disable
EOAdaptorDebugging on "entry" to this framework and reenable on
"exit". Any suggestions for how to do that?
TIA
--arturo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.