You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Se...@putnam.com on 2003/02/07 00:01:56 UTC

log written in catalina.out and log file





Hi,

I am using Log4j and tomcat web server. The log messages gets logged into
both
my log file and also catalina.out.
I dont want log to be written in catalina.out.
The log4j properties file is given below..

I appreciate for your time and help,
Senthil.


*************************************************************


log4j.logger.com.putnam.dataAccess.util=debug,R
log4j.logger.com.putnam.dataAccess.fame=debug,R
log4j.logger.com.putnam.dataAccess.server=debug,R
log4j.logger.com.putnam.dataAccess.catalog=debug,R
log4j.logger.com.putnam.dataAccess.fact=debug,R
log4j.logger.com.putnam.dataAccess.aggregation=debug,R

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/fameprod/fame2/phs_db/fameprod/usr/local/DAT2/logs/dataAccess.log

log4j.appender.R.MaxFileSize=5MB
# Keep 10 backup file
log4j.appender.R.MaxBackupIndex=10

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %5p (%F:%L) - %m%n

*************************************************************************



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


Re: log written in catalina.out and log file

Posted by Martin <mg...@hotmail.com>.
Senthil-
you could comment out all the Logger info in conf/server.xml
and dont do any System.outs
Does this help?
-M
----- Original Message -----
From: <Se...@putnam.com>
To: "Log4J Users List" <lo...@jakarta.apache.org>
Sent: Thursday, February 06, 2003 7:01 PM
Subject: log written in catalina.out and log file


>
>
>
>
>
> Hi,
>
> I am using Log4j and tomcat web server. The log messages gets logged into
> both
> my log file and also catalina.out.
> I dont want log to be written in catalina.out.
> The log4j properties file is given below..
>
> I appreciate for your time and help,
> Senthil.
>
>
> *************************************************************
>
>
> log4j.logger.com.putnam.dataAccess.util=debug,R
> log4j.logger.com.putnam.dataAccess.fame=debug,R
> log4j.logger.com.putnam.dataAccess.server=debug,R
> log4j.logger.com.putnam.dataAccess.catalog=debug,R
> log4j.logger.com.putnam.dataAccess.fact=debug,R
> log4j.logger.com.putnam.dataAccess.aggregation=debug,R
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
>
log4j.appender.R.File=/fameprod/fame2/phs_db/fameprod/usr/local/DAT2/logs/da
taAccess.log
>
> log4j.appender.R.MaxFileSize=5MB
> # Keep 10 backup file
> log4j.appender.R.MaxBackupIndex=10
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
> log4j.appender.R.layout.ConversionPattern=%d %5p (%F:%L) - %m%n
>
> *************************************************************************
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>

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


Re: log written in catalina.out and log file

Posted by Ceki Gülcü <ce...@qos.ch>.

This is a known problem. Commons-logging (used by tomcat and struts)
configures a ConsoleAppender whenever it detects log4j but
decides that log4j was not configured. If you configure log4j later yourself,
in particular if you attach an appender to root logger, this should
override commons-logging configuration. See the code in
o.a.c.logging.impl.Log4JCategoryLog.java for more details.

I hope this gives you at least puts you on the right path.

At 18:01 06.02.2003 -0500, Senthil_M_Kumar@putnam.com wrote:

>Hi,
>
>I am using Log4j and tomcat web server. The log messages gets logged into
>both
>my log file and also catalina.out.
>I dont want log to be written in catalina.out.
>The log4j properties file is given below..
>
>I appreciate for your time and help,
>Senthil.
>
>
>*************************************************************
>
>
>log4j.logger.com.putnam.dataAccess.util=debug,R
>log4j.logger.com.putnam.dataAccess.fame=debug,R
>log4j.logger.com.putnam.dataAccess.server=debug,R
>log4j.logger.com.putnam.dataAccess.catalog=debug,R
>log4j.logger.com.putnam.dataAccess.fact=debug,R
>log4j.logger.com.putnam.dataAccess.aggregation=debug,R
>
>log4j.appender.R=org.apache.log4j.RollingFileAppender
>log4j.appender.R.File=/fameprod/fame2/phs_db/fameprod/usr/local/DAT2/logs/dataAccess.log
>
>log4j.appender.R.MaxFileSize=5MB
># Keep 10 backup file
>log4j.appender.R.MaxBackupIndex=10
>
>log4j.appender.R.layout=org.apache.log4j.PatternLayout
>log4j.appender.R.layout.ConversionPattern=%d %5p (%F:%L) - %m%n
>
>*************************************************************************
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki 


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