Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 65788 invoked from network); 13 May 2004 11:14:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 May 2004 11:14:09 -0000 Received: (qmail 12561 invoked by uid 500); 13 May 2004 11:13:50 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 12332 invoked by uid 500); 13 May 2004 11:13:48 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 12297 invoked by uid 98); 13 May 2004 11:13:47 -0000 Received: from igor@prozone.co.yu by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(195.252.123.178):. Processed in 0.035445 secs); 13 May 2004 11:13:47 -0000 X-Qmail-Scanner-Mail-From: igor@prozone.co.yu via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(195.252.123.178):. Processed in 0.035445 secs) Received: from unknown (HELO vajat.prozone.local) (195.252.123.178) by hermes.apache.org with SMTP; 13 May 2004 11:13:45 -0000 Received: from talicnitom (talicnitom.prozone.local [192.168.0.23]) by vajat.prozone.local (8.12.5/8.12.5) with SMTP id i4DDXhGc016597 for ; Thu, 13 May 2004 15:33:43 +0200 Message-ID: <005d01c438db$9b2f5420$1700a8c0@talicnitom> From: "Igor Smirnov" To: "Jakarta Commons Users List" References: Subject: Re: [logging] How to get logging to use new Monolog subclass Date: Thu, 13 May 2004 13:15:32 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N As previously said, I'd need to set a system logger. I start tomcat with catalina start. Now, looking into Tomcat 5 classloader doc http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html , I've found that using this script only a few .jars will be loaded (Check the page). I am run-time debugging commons logging and that is why I needed to start this script. I am about yo try starting tomcat differently and will report my findings shortly... Thanks, Igor ----- Original Message ----- From: "Tatu Vanhanen" To: "Jakarta Commons Users List" 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" > > To: "Jakarta Commons Users List" > > 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" > > > >To: "Jakarta Commons Users List" > > > >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