tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nehal Sangoi" <nehal.san...@patni.com>
Subject RE: enable log4j
Date Fri, 25 Nov 2005 09:02:36 GMT
Hi Dhaval,

We never start our Tomcat-Base. We only run Tomcat Instances. So, i need
log4j be enabled individually. I have gone thru the docs and did same as its
suggested there. But no luck. Is there any way, for tomcat instance to know
abt the properties file added into classes????

-----Original Message-----
From: Dhaval Patel [mailto:dhaval04@yahoo.com]
Sent: Tuesday, November 22, 2005 7:13 PM
To: Tomcat Users List; nehal.sangoi@patni.com
Subject: RE: enable log4j


Hi Nehal,

   I dont know how to work with multiple tomcat instances. The way I
configured
my tomcat (single user) to use log4j is different then yours. I followed
guide
from http://tomcat.apache.org/tomcat-5.5-doc/logging.html . Basically it
says,

1. Create a file called log4j.properties with the following content and save
it
into common/classes. (The one with yours is fine).

2. Place the log4j jar in $CATALINA_HOME/common/lib. (In our case, it is
log4j-1.2.12.jar. Make sure you place it in common/lib rather than in any
webapps.)

3. Place the commons-logging.jar (not commons-logging-api.jar) in
$CATALINA_HOME/common/lib with the log4j jar. (Again it is common/lib not
webapps)

4. Restart tomcat.

    I followed above steps and I could run my tomcat instance in debug mode.
For
customized debugging, you can read API documentation of Tomcat and may be
you can
able to find something. This way you can customize your log4j.properties. I
will
keep looking but I don't have that sort of environment here to play with. If
I
find any thing, I will let you know.

    I hope above things help a bit.

Regards,
D

--- Nehal Sangoi <nehal.sangoi@patni.com> wrote:

> Hi Dhaval,
>
> I want to enable log4j in debug mode only for one of the tomcat instances
> which is running using different user -- i.e. other than tomcat-base.
> This means, i don't want to apply log4j on all tomcat instaces by
> implemeting it onto tomcat-base.
>
> -----Original Message-----
> From: Dhaval Patel [mailto:dhaval04@yahoo.com]
> Sent: Tuesday, November 22, 2005 6:25 PM
> To: Tomcat Users List; nehal.sangoi@patni.com
> Subject: Re: enable log4j
>
>
> Hi Nehal,
>
>    Do you want to enable log4j in your application or you want to enable
> log4j
> inside tomcat? Inside tomcat means, tomcat uses log4j instead of J2SE
> logging
> utility so that you can configure tomcat loggin in log4j.
>
> Regards,
> D
>
> --- Nehal Sangoi <nehal.sangoi@patni.com> wrote:
>
> >
> > Hi,
> >
> > I want to enable log4j logger in one of my tomcat instances. I copied
> > "log4j-1.2.12.jar" to my webapps - war file.
> > This means, under WEB-INF/lib, copied jar file and under
WEB-INF/classes,
> > copied log4j.properties. Later, re-sreated warfile and started my tomcat
> > instance.
> >
> > log4j.properties :
> >
> > log4j.rootLogger=debug, R
> > log4j.appender.R=org.apache.log4j.RollingFileAppender
> > log4j.appender.R.File=${catalina.base}/logs/tomcat.log
> > log4j.appender.R.MaxFileSize=10MB
> > log4j.appender.R.MaxBackupIndex=10
> > log4j.appender.R.layout=org.apache.log4j.PatternLayout
> > log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
> > log4j.logger.org.apache.catalina=DEBUG, R
> >
> > Also, notice that i have tomcat 5.5.9 on solaris 10. But my jar file is
> > log4j-1.2.12.jar.
> >
> > Is there anything 'm doing wrong or incomplete?....
> >
> > Please help as soon as possible....
> >
> > Thanks.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>





__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message