Hi,
Every now and then there's a use-case where the logging statements seem
to almost-but-not-quite fit any of the established levels.  There are
conceptually two approaches:

- Create your own level
- Use an existing level

Creating your own level is possible in log4j.  The downside is that you
start using non-standard functionality and it's up to you to maintain
it.  While the log4j team makes every effort is made to stay backwards
compatible, any non-standard part you add to your system requires at
least more testing, if not coding, when moving to a new release of
log4j.

Using an existing level is very easy technically.  However, you have to
adjust your mental perception of what's DEBUG, as well as your coding
practices.  And by "your", it could be a whole group of developers, not
just one, so this is not always an easy change.

IMHO, it's definitely paid off to use an existing level, DEBUG.  I'm
happy about not using custom levels.  

TRACE, anyone? ;)

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 20, 2002 10:54 AM
>To: [EMAIL PROTECTED]
>Subject: New Level?
>
>I'm working on a project where I'm implementing a 3rd party
>proprietary/(mostly undocumented) network protocol.
>One of my logging statements dumps each byte as it's received/sent over
the
>network. This is used in the "direst" debugging situations, and can
>obviously generate a very large number of logging events.
>(90% or more of the data is just encoded character data, and I also
debug
>each character as it's decoded, so I get alot of events here as well.)
>
>These statements have the level of "DEBUG", but I think these
situations
>warrant a new Level. Say "DEBUG_PEDANTIC". Basically this Level could
be
>used in situations where the statement is a debug statement by
definition,
>but it's called such a HUGE amount of times, and carries so little
>information, that it's only used in special/rare circumstances.
>
>Does this make any sense to add to log4j permanently? Does anyone else
have
>a use for it?
>Or should I just add it myself to my own copy and use it privately?
>
>Thanks.
>-Mark
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:log4j-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:log4j-user-
>[EMAIL PROTECTED]>

This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to