logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <paul.sm...@lawlex.com.au>
Subject Re: discreet log types
Date Fri, 15 Aug 2003 02:22:54 GMT
>          Yes, actually I had already gone down that road as one of my first 
> solutions before I posted my original message.  However, when I considered 
> that option, I was appending the logging type, which was a problem when 
> trying to specify packages instead of individual classes.  But your 
> suggestion to put it at the beginning could solve that problem.

As I was writing my last message I also started with it at the end, and
realised the same thing you have.  I think it has more power at the
front.  Log4j does not have a complete taxonomy, it is strictly
hierarchical, so you will ALWAYS have to choose a primary node structure
at the top (this is usually the package name hierarchy).  It sounds like
your "aspect" (DB, TRACE) etc is your primary concern, with a secondary
concern of the source class.  

>          I'm not so worried about it being clumsy because I can always hide 
> it with a wrapper around the front-end if necessary (i.e. create a static 
> factory-like method).  And I would only have to define loggers for the 
> logging types that my class would be using, not necessarily every one that 
> is defined, especially since the list needs to be extensible.  And it would 
> also allow me to enable multiple logging types for a single class/package.
> 
>          I'll have to give this one some more thought!  It's not the 
> cleanest of solutions, but if no one else on the list thinks this would be 
> a good feature to have, then perhaps this would be the quickest solution 
> for my situation.  Thanks again for your ideas!

Feel free to discuss your ideas further on the list as you develop them,
I'm sure other people will be interested in how you go (definately me). 
May even be worth a nice Wiki page outlining your ideas, and how you
accomplished them.  I'm sure other people would appreciate it if you
have the time.  (see
http://nagoya.apache.org/wiki/apachewiki.cgi?Log4JProjectPages)

cheers,

Paul Smith


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


Mime
View raw message