logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John.E.Gr...@wellsfargo.com
Subject RE: Wrapping Log4J Help
Date Thu, 03 Mar 2005 17:20:40 GMT
In what way does your wrapper provide plugability that commons-logging
doesn't?  I don't mean to harrass you about it, but we have a wrapper also
that I'm having second thoughts about.

Thanks


-----Original Message-----
From: The Dude [mailto:love_the_dude@hotmail.co.uk] 
Sent: Thursday, March 03, 2005 11:17 AM
To: log4j-user@logging.apache.org
Subject: RE: Wrapping Log4J Help


Hi John

I  need to provide a wapper so that we can then change the implementation to

other impls. In actual fact:

1) Client --- > Wrapper -----> Commons Logging ----> Log4jimpl
2) Client --- > Wrapper -----> Commons Logging
3) Client --- > Wrapper -----> Commons Logging ----> JDKLogging

Its our client that wants to be flexible. Oh well .if i cant do the %F:%L 
... its no big deal.

Thanks anyway :-)


>From: John.E.Gregg@wellsfargo.com
>Reply-To: "Log4J Users List" <log4j-user@logging.apache.org>
>To: log4j-user@logging.apache.org
>Subject: RE: Wrapping Log4J Help
>Date: Thu, 3 Mar 2005 11:04:55 -0600
>
>El Duderino,
>
>I haven't looked at how the logger impl works in this area, but it 
>looks like you might be stuck with that.  Your wrapper is in fact the 
>caller.
>
>BTW, why did you wrap log4j?
>
>John
>
>
>-----Original Message-----
>From: The Dude [mailto:love_the_dude@hotmail.co.uk]
>Sent: Thursday, March 03, 2005 10:55 AM
>To: log4j-user@logging.apache.org
>Subject: Wrapping Log4J Help
>
>
>Hi
>
>i have written a wrapper for log4j which delegates all my calls to the 
>underlying log4j impementation here is a code snipped:
>
>public class Wrapper implements SomeIF {
>
>     private Category log = null;
>
>     public Wrapper(final String className) {
>         log = Category.getInstance(className);
>     }
>
>    // usual debug, warn, error methods delegate to the log variable
>
>}
>
>I instantiate this wrapper using a factory and all users/clients 
>work/log against the SomeIF interface that this class implements. Its 
>just a simple wrapper/impl hidden behind a factory.
>
>My problem is when I log any statements and the pattern includes the 
>source of the file and line number  (%F:%L) ... its the wrapper details 
>that are printed
>
>[Wrapper .java:177] INFO- This is a an info message
>
>Is this something I need to accept ie - I cant use the %F:%L conversion 
>pattern or is there another way to solve this ?
>
>Peace
>Cameron
>
>_________________________________________________________________
>It's fast, it's easy and it's free. Get MSN Messenger today! 
>http://www.msn.co.uk/messenger
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>

_________________________________________________________________
Want to block unwanted pop-ups? Download the free MSN Toolbar now!  
http://toolbar.msn.co.uk/


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

---------------------------------------------------------------------
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