You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by struts Dude <sc...@slingshot.co.nz> on 2004/09/06 13:30:32 UTC

Simple log4j.properties HELP

Hi guys
I can't seem to get the following simple log4j.properties file
to work. I have log4j-1.2.8.jar and commons-logging-1-0-3.jar
in WEB-INF/lib of my web app.

Also the following log4j.properties in class folder of web app.

---------

log4j.rootCategory=info, stdout
log4j.logger.com.template=debug, rolling

log4j.additivity.com.template=false

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%-5p [%t] %c %M- %m%n

log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=${catalina.home}/logs/webcontact.log
log4j.appender.rolling.MaxFileSize=300kb
log4j.appender.rolling.MaxBackupIndex=9
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a} %-5p
%C %M- %m%n

------------

stdout logger seems to work fine but I can't output anything
to rolling logger. I did create an empty webcontact.log file
in ${catalina.home}/logs though.

I use tomcat-5.0.27.

Thanks


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


RE: Simple log4j.properties HELP

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
>From your log4j.properties file, you should
find more information in the log file 
named under the "rolling" appender which
your .properties file listed as being at:
${catalina.home}/logs/webcontact.log

Regards,
David

-----Original Message-----
From: struts Dude [mailto:scea@slingshot.co.nz]
Sent: Sunday, September 12, 2004 10:34 PM
To: Struts Users Mailing List
Subject: Re: Simple log4j.properties HELP


Hi David,

I don't have this file, no idea where that is supposed to be. I just
drop a log4j.properties file in /WEB-INF/classes of my web app.

Thanks

----- Original Message ----- 
From: "David G. Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, September 07, 2004 2:42 PM
Subject: RE: Simple log4j.properties HELP


> Can you show us your commons-logging.properties file, which should set up
> the sending of log messages to log4j?
>
> Regards,
> David
>
> -----Original Message-----
> From: struts Dude [mailto:scea@slingshot.co.nz]
> Sent: Monday, September 06, 2004 7:31 AM
> To: Struts Users Mailing List
> Subject: Simple log4j.properties HELP
>
>
> Hi guys
> I can't seem to get the following simple log4j.properties file
> to work. I have log4j-1.2.8.jar and commons-logging-1-0-3.jar
> in WEB-INF/lib of my web app.
>
> Also the following log4j.properties in class folder of web app.
>
> ---------
>
> log4j.rootCategory=info, stdout
> log4j.logger.com.template=debug, rolling
>
> log4j.additivity.com.template=false
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.stdout.layout.ConversionPattern=%-5p [%t] %c %M- %m%n
>
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> log4j.appender.rolling.File=${catalina.home}/logs/webcontact.log
> log4j.appender.rolling.MaxFileSize=300kb
> log4j.appender.rolling.MaxBackupIndex=9
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a}
%-5p
> %C %M- %m%n
>
> ------------
>
> stdout logger seems to work fine but I can't output anything
> to rolling logger. I did create an empty webcontact.log file
> in ${catalina.home}/logs though.
>
> I use tomcat-5.0.27.
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


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


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


Re: Simple log4j.properties HELP

Posted by struts Dude <sc...@slingshot.co.nz>.
Hi David,

I don't have this file, no idea where that is supposed to be. I just
drop a log4j.properties file in /WEB-INF/classes of my web app.

Thanks

----- Original Message ----- 
From: "David G. Friedman" <hu...@ix.netcom.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Tuesday, September 07, 2004 2:42 PM
Subject: RE: Simple log4j.properties HELP


> Can you show us your commons-logging.properties file, which should set up
> the sending of log messages to log4j?
>
> Regards,
> David
>
> -----Original Message-----
> From: struts Dude [mailto:scea@slingshot.co.nz]
> Sent: Monday, September 06, 2004 7:31 AM
> To: Struts Users Mailing List
> Subject: Simple log4j.properties HELP
>
>
> Hi guys
> I can't seem to get the following simple log4j.properties file
> to work. I have log4j-1.2.8.jar and commons-logging-1-0-3.jar
> in WEB-INF/lib of my web app.
>
> Also the following log4j.properties in class folder of web app.
>
> ---------
>
> log4j.rootCategory=info, stdout
> log4j.logger.com.template=debug, rolling
>
> log4j.additivity.com.template=false
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.stdout.layout.ConversionPattern=%-5p [%t] %c %M- %m%n
>
> log4j.appender.rolling=org.apache.log4j.RollingFileAppender
> log4j.appender.rolling.File=${catalina.home}/logs/webcontact.log
> log4j.appender.rolling.MaxFileSize=300kb
> log4j.appender.rolling.MaxBackupIndex=9
> log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a}
%-5p
> %C %M- %m%n
>
> ------------
>
> stdout logger seems to work fine but I can't output anything
> to rolling logger. I did create an empty webcontact.log file
> in ${catalina.home}/logs though.
>
> I use tomcat-5.0.27.
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


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


RE: Simple log4j.properties HELP

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Can you show us your commons-logging.properties file, which should set up
the sending of log messages to log4j?

Regards,
David

-----Original Message-----
From: struts Dude [mailto:scea@slingshot.co.nz]
Sent: Monday, September 06, 2004 7:31 AM
To: Struts Users Mailing List
Subject: Simple log4j.properties HELP


Hi guys
I can't seem to get the following simple log4j.properties file
to work. I have log4j-1.2.8.jar and commons-logging-1-0-3.jar
in WEB-INF/lib of my web app.

Also the following log4j.properties in class folder of web app.

---------

log4j.rootCategory=info, stdout
log4j.logger.com.template=debug, rolling

log4j.additivity.com.template=false

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=%-5p [%t] %c %M- %m%n

log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=${catalina.home}/logs/webcontact.log
log4j.appender.rolling.MaxFileSize=300kb
log4j.appender.rolling.MaxBackupIndex=9
log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
log4j.appender.rolling.layout.ConversionPattern=%d{MM/dd/yy hh:mm:ss a} %-5p
%C %M- %m%n

------------

stdout logger seems to work fine but I can't output anything
to rolling logger. I did create an empty webcontact.log file
in ${catalina.home}/logs though.

I use tomcat-5.0.27.

Thanks


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


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