#2 works fine, depending on your needs. #3 will work, but it's much uglier
and resource intensive than the others.
>From what I understand, TRACE was left out of the default Priority class for
primarily philisophical reasons. You can extend it easily enough, though,
if method #2 doesn't work well for you. Search the mailing list archives
for "TRACE" and you'll see example code on how to do it. (Along with
potential problems you might encounter.)
-Jim Moore
-----Original Message-----
From: Scruffles - [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 22, 2001 9:51 AM
To: [EMAIL PROTECTED]
Subject: Best method of Tracing
We are just beginning to replace our old logging
system with Log4J. So far it's been great. I have
one question though:
We have trace messages at the beginning and end of key
methods. We use them to track lags in parts of our
system as well as for debugging. Although I don't
think they are entirely necessary, I don't think I
will be able to articulate a good argument. Rather
than fighting this, I would like a nice clean way to
turn them off. I have thought about a couple
solutions. Which is more correct:
1. to extend Priority to include a TRACE type (I
assume this was left out for a reason)
2. to use DEBUG for these trace messages and INFO for
our typical debugging messages. This would let me
turn off all trace messages, and leave debugging
(INFO) on.
3. create a root category for trace messages (much
like we will be doing for XML and SQL). Categories
would look like this: TRACE.com.mycompany.mypackage
(our sql statements will be written to
SQL.com.mycompany.mypackage)
Any suggestions?
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]