commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <japte...@indra.es>
Subject Re: [logging] How to get logging to use new Monolog subclass
Date Thu, 13 May 2004 10:37:27 GMT
And in the WEB-INF/lib ???

Igor Smirnov wrote:

>Well, I put my jar in all lib places.
>commons-logging.api.jar
>log4j-1.2.8.jar
>monolog.jar
>
>are in tomcat/bin, tomcat, tomcat/common/lib, tomcat/shared/lib.
>
>----- Original Message -----
>From: "Tatu Vanhanen" <tatu.vanhanen@graftor.fi>
>To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>Sent: Thursday, May 13, 2004 12:02 PM
>Subject: RE: [logging] How to get logging to use new Monolog subclass
>
>
>  
>
>>Maybe you know this already, but here some thoughts; correct me if I'm
>>wrong!
>>
>>If you have your log (i.e. Monolog) classes in the webapp's classpath (jar
>>in WEB-INF/lib or classes in WEB-INF/classes), you also need to place the
>>commons-loggin jar to each webapp where the Monolog is used. The reason is
>>that the webapp classloader sees classes in the parent loader's classpath
>>(Tomcat shared lib, for example), but the shared classloader does not see
>>classes in the webapps' classpath. So, if commons-logging is placed in the
>>Tomcat shared lib, it can not load classes placed in a webapp's classpath.
>>
>>I think the same applies also to property files: they can be found in the
>>WEB-INF/classes only if the log classes that need them are also placed in
>>the webapp.
>>
>>Where you have placed the Monolog and commons-logging classes?
>>
>>- Tatu V.
>>
>>    
>>
>>>-----Original Message-----
>>>From: Igor Smirnov [mailto:igor@prozone.co.yu]
>>>Sent: 13. toukokuuta 2004 12:21
>>>To: Jakarta Commons Users List
>>>Subject: Re: [logging] How to get logging to use new Monolog subclass
>>>
>>>
>>>Thanks Jose,
>>>
>>>Well, I made a little progress:
>>>For whatever reason commons-logging-api.jar doesn't see neither log4j
>>>      
>>>
>nor
>  
>
>>>monolog's jars.
>>>So, i.e. LogFactoryImpl.java:
>>>protected boolean isLog4JAvailable() {
>>>try {
>>>loadClass("org.apache.log4j.Logger");
>>>...
>>>
>>>doesn't load lof4j. Trows exception instead. I tried moving my
>>>jar in every
>>>single directory in Tomcat but did not help.
>>>Any fresh ideas? :)
>>>
>>>----- Original Message -----
>>>From: "José Antonio Pérez Testa" <japtesta@indra.es>
>>>To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>>>Sent: Wednesday, May 12, 2004 6:19 PM
>>>Subject: Re: [logging] How to get logging to use new Monolog subclass
>>>
>>>
>>>      
>>>
>>>>Try an empty implementation of MonologLogger. Maybe the implementation
>>>>also uses logs in any way ...
>>>>If the empty implementation gets instantiated the problem will be in
>>>>your implementation.
>>>>
>>>>If not try replacing all that code for
>>>>return new MonologLogger("Forced")
>>>>
>>>>and see what happen ...
>>>>I'm running out of ideas :)
>>>>
>>>>Igor Smirnov wrote:
>>>>
>>>>        
>>>>
>>>>>This is odd:
>>>>>logClass.getConstructor(logConstructorSignature)
>>>>>
>>>>>return a No Class Definition Exception!
>>>>>
>>>>>and here are the values
>>>>>logClass= Class (org.apache.commons.logging.impl.MonologLogger)
>>>>>I DO have a
>>>>>   public MonologLogger(String name) {
>>>>>       this.logger=lf.getLogger(name);
>>>>>   }
>>>>>
>>>>>
>>>>>----- Original Message -----
>>>>>From: "José Antonio Pérez Testa" <japtesta@indra.es>
>>>>>To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>>>>>Sent: Wednesday, May 12, 2004 3:31 PM
>>>>>Subject: Re: [logging] How to get logging to use new Monolog subclass
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>Well done!
>>>>>>if everything is right  logClass must be YourImplementation.class
>>>>>>            
>>>>>>
>and
>  
>
>>>>>>if  YourImplementation has a constructor like
>>>>>>public YourImplementation(String name) {....}
>>>>>>it HAS TO work!!
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>  
>

-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información
de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita
de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention
and use of the named addressee(s). You are hereby notified that any dissemination, distribution
or copy of this communication is prohibited without the prior written consent of Indra. If
you have received this communication in error, please, notify the sender by reply e-mail

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


Mime
View raw message