logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernier, Dominique (DVernier)" <dvern...@relaystar.com>
Subject RE: Create LogFactory/Log for Log4j and use commons.logging
Date Thu, 10 Jun 2004 09:35:31 GMT
In MyLogger I set use DOMConfigurator.configureAndWatch() to set a Watch period.

-----Original Message-----
From: Ceki Gülcü [mailto:ceki@qos.ch] 
Sent: jeudi 10 juin 2004 11:20
To: Log4J Users List
Subject: Re: Create LogFactory/Log for Log4j and use commons.logging



In what way does MyLogger differ from o.a.log4j.Logger?

At 09:49 AM 6/10/2004, Vernier, Dominique (DVernier) wrote:
>Hi,
>
>I would like to use commons.logging with Log4j has underlying logging 
>system. I know that commos.logging will use Log4j if it found in the 
>class path, but I would like to create my own LogFactory and use:
>
>import org.apache.commons.logging.Log;
>
>import org.apache.commons.logging.LogFactory;
>
>         private static Log logger = LogFactory.getLog(Test.class);
>
>I know also that by setting system property 
>-Dorg.apache.commons.logging.Log=... we can define the Log class used 
>by commons.logging.LogFactory to instanciate the Logger.
>
>Then based on the sample of MyLoggerFactory and MyLogger, I create my 
>own factory and logger. I implement the commons.logging.Log in the 
>MyLogger, but when I used it I have a nullpointer on the repository.
>
>Do you have any idea or examples on which I can relie?
>
>Thx
>Dominique

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



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