I have multiple applications, say app1 and app2.  I want separate 
logging for each application.  log4j creates a static repository 
associated with each classloader.  They suggest having separate 
jars in each appx/WEB-INF/lib directory so that log4j's static classes 
create separate repositories because each application uses a 
separate classloader.

This works great.  However, Eclipse doesn't seem to create 
separate classloaders, or something, as only one of my loggers 
works, and then only if I explicitly put /lib/log4j.jar in the classpath.  
There was a thread about this on a WebSphere list that said that 
one had to change WS's classloader default to "Parent-last" but I 
don't know whether this applies to Eclipse.

I'm hoping someone on this list has some experience with multiple 
applications in Tomcat, log4j and Eclipse.  I've been wrestling with 
this for a while and can't find anyone that has been able to help.

TIA

Bill


Send reply to:      "Tomcat Users List" <[EMAIL PROTECTED]>
Subject:            RE: Need help with Log4j and Tomcat5
Date sent:          Fri, 23 Jul 2004 09:50:28 -0500
From:               "Tonte Pouncil" <[EMAIL PROTECTED]>
To:                 "Tomcat Users List" <[EMAIL PROTECTED]>

> So you have different log4j jar files?  If so why, why not just use one?
> 
> -----Original Message-----
> From: Bill Harrelson [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 23, 2004 9:37 AM
> To: Tomcat Users List
> Subject: RE: Need help with Log4j and Tomcat5
> 
> 
> This works fine for me under Tomcat, and works well for multiple 
> applications (jars in each WEB-INF/lib, props files in each /class).  
> However, when I try to do the same under Eclipse, I get 
> classNotFound for log4j.jar unless I put the jars (in each WEB-
> INF/lib) explicitly into the Eclipse run/debug classpath, in which case 
> it only picks up the first jar and I only get one logger.
> 
> Has anybody else run into this?  Anybody have any idea what to do 
> next?
> 
> TIA,
> 
> Bill
> 
> 
> Send reply to:      "Tomcat Users List" <[EMAIL PROTECTED]>
> Subject:            RE: Need help with Log4j and Tomcat5
> Date sent:          Fri, 23 Jul 2004 09:14:59 -0500
> From:               "Tonte Pouncil" <[EMAIL PROTECTED]>
> To:                 "Tomcat Users List" <[EMAIL PROTECTED]>
> 
> > Thanks a lot.  I was successful at logging my debug statements.  Thanks a bunch!
> > 
> > tp
> > 
> > -----Original Message-----
> > From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 23, 2004 7:50 AM
> > To: Tomcat Users List
> > Subject: RE: Need help with Log4j and Tomcat5
> > 
> > 
> > 
> > Hi,
> > Just what's mentioned in the log4j manual:
> > - Place log4j.jar in WEB-INF/lib
> > - Place log4j code in your JSPs as you wish
> > - Place log4j.properties in WEB-INF/classes or configure log4j
> > programmatically.
> > 
> > Yoav Shapira
> > Millennium Research Informatics
> > 
> > 
> > >-----Original Message-----
> > >From: Tonte Pouncil [mailto:[EMAIL PROTECTED]
> > >Sent: Thursday, July 22, 2004 5:27 PM
> > >To: [EMAIL PROTECTED]
> > >Subject: Need help with Log4j and Tomcat5
> > >
> > >Hello,
> > >
> > >What do I have to do to use Log4j in my jsp application which running
> > on
> > >Tomcat5?
> > >
> > >Thanks!
> > >
> > >tp
> > >
> > >
> > >  <http://www.imc2.com/imc2Logo.gif>
> > >tonte pouncil
> > >software developer
> > >
> > >214.224.1105
> > > <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> > >
> > >www.imc2.com <http://www.imc2.com/> <?xml:namespace prefix = o ns =
> > >"urn:schemas-microsoft-com:office:office" />
> > >
> > >
> > >7505 john carpenter frwy
> > >dallas, texas 75247
> > >214.224.1000
> > >fax/214.224.1100
> > >
> > >
> > 
> > 
> > 
> > This e-mail, including any attachments, is a confidential business communication, 
> > and may contain information that is confidential, proprietary and/or privileged.  
> > This e-mail is intended only for the individual(s) to whom it is addressed, and 
> > may not be saved, copied, printed, disclosed or used by anyone else.  If you are 
> > not the(an) intended recipient, please immediately delete this e-mail from your 
> > computer system and notify the sender.  Thank you.
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to