logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject conversion patterns and caller class information
Date Sat, 05 Jun 2004 18:16:34 GMT

I'm noticing an issue with using the conversion characters which generate 
caller class information.  In a project I'm working on, logging is done via 
a sort of Monitor framework.  Anything can back the Monitor whether it be 
System.out, nothing, Log4j, etc.  This makes it so that no logging 
framework becomes a runtime dependency of the library unless a user 
explicitly configures the library to use a particular Monitor 
implementation such as one backed by Log4j.  The thing is, classes call the 
monitor to let the obfuscated logger implementation do the logging.  As 
such, if I use the Log4j implementation and use the conversion characters 
such as "C", "F", "L", and "M", it ends up looking like logging came from 
the Log4jMonitor rather than the class that is calling the log4j monitor, 
which is what I'd want.

The whole Monitor idea kind of came from this post:
http://paulhammant.com/blog//000241.html

Is there any way around this?  I have my doubts, but I thought I'd ask 
anyway.  If this particular approach won't work, are there others that meet 
the requirements of said article, but don't suffer from the problem state 
above?  Just looking for ideas.


Jake


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message