RE: enable log4j

2005-11-25 Thread Nehal Sangoi
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:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 7:13 PM
To: Tomcat Users List; [EMAIL PROTECTED]
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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]
 Sent: Tuesday, November 22, 2005 6:25 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




 __
 Yahoo! FareChase: Search multiple travel sites in one click.
 http://farechase.yahoo.com

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







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

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



Re: enable log4j

2005-11-22 Thread Dhaval Patel
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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

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



RE: enable log4j

2005-11-22 Thread Dhaval Patel
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 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]
 Sent: Tuesday, November 22, 2005 6:25 PM
 To: Tomcat Users List; [EMAIL PROTECTED]
 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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 __
 Yahoo! FareChase: Search multiple travel sites in one click.
 http://farechase.yahoo.com
 
 -
 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]
 
 





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

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