tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bizio <fab...@gmail.com>
Subject log4j and two webapps
Date Fri, 09 May 2008 21:57:38 GMT

Hi guys.
This is my first post here.
I have a problem with log4j in one of two mine webapps: the first
log4j.properties looks like

# Conventions used in code
# + Only few logging statements are at level INFO, just to log user activity
# + RPC actions log at level DEBUG
# + BM classes log at level DEBUG
#
# LOG4J levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL
#
log4j.rootLogger=INFO,CONSOLE,FILE
log4j.logger.com.hp.fastweb.wallet.model.balance=ALL,BM
log4j.logger.com.hp.fastweb.wallet.web.action.rpc.mfp=ALL,RPC-MFP
log4j.logger.com.hp.fastweb.wallet.web.action.rpc.om=ALL,RPC-OM
log4j.logger.com.hp.fastweb.wallet.web.action.rpc.pg=ALL,RPC-PG
log4j.logger.com.hp.fastweb.wallet.web.action.rpc.vitria=ALL,RPC-VITRIA
log4j.logger.com.hp.fastweb.wallet.web.action.rpc.techtroubleshoot=ALL,RPC-TT

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%5p][%c{1}] %m%n

log4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.FILE.file=../logs/starpay-web.log
log4j.appender.FILE.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-MFP-SECURITY = com.hp.util.appender.RPCSecureCallAppender
log4j.appender.RPC-MFP-SECURITY.File=../logs/starpay.tmp
log4j.appender.RPC-MFP-SECURITY.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-MFP-SECURITY.layout.ConversionPattern=%d{yyyyMMddHHmmss};%m%n
log4j.appender.RPC-MFP-SECURITY.maxRolloverLines=100

log4j.appender.BM=org.apache.log4j.DailyRollingFileAppender
log4j.appender.BM.layout=org.apache.log4j.PatternLayout
log4j.appender.BM.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.BM.file=../logs/starpay-bm.log
log4j.appender.BM.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-MFP=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RPC-MFP.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-MFP.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.RPC-MFP.file=../logs/rpc-mfp.log
log4j.appender.RPC-MFP.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-OM=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RPC-OM.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-OM.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.RPC-OM.file=../logs/rpc-om.log
log4j.appender.RPC-OM.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-PG=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RPC-PG.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-PG.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.RPC-PG.file=../logs/rpc-pg.log
log4j.appender.RPC-PG.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-VITRIA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RPC-VITRIA.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-VITRIA.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.RPC-VITRIA.file=../logs/rpc-vitria.log
log4j.appender.RPC-VITRIA.datePattern='.'yyyy-MM-dd

log4j.appender.RPC-TT=org.apache.log4j.DailyRollingFileAppender
log4j.appender.RPC-TT.layout=org.apache.log4j.PatternLayout
log4j.appender.RPC-TT.layout.ConversionPattern=%d [%5p][%c{1}][%t] %m%n
log4j.appender.RPC-TT.file=../logs/rpc-tt.log
log4j.appender.RPC-TT.datePattern='.'yyyy-MM-dd

# Level tuning
log4j.logger.org.apache=INFO
log4j.logger.org.mortbay=INFO
log4j.logger.com.opensymphony=INFO
log4j.logger.org.springframework=WARN
log4j.logger.org.hibernate=WARN
log4j.logger.org.hibernate.util.JDBCExceptionReporter=OFF
log4j.logger.org.hibernate.event.def.AbstractFlushingEventListener=OFF
#log4j.logger.org.hibernate.SQL=ALL
log4j.logger.org.hibernate.cache=ERROR
log4j.logger.net.sf.ehcache=INFO

log4j.logger.rpc.mfp.trace=INFO, RPC-MFP-SECURITY


This is under app/WEB-INF/classes/log4j.properties and this is work fine.
The other one, under app1/WEB-INF/classes/log4j.properties looks like this
and doesn't works.

log4j.rootLogger=ERROR, STDOUT
log4j.logger.axis=DEBUG, DEFAULT
log4j.logger.hp.ws.mvno=DEBUG, MVNO

# STDOUT: stdout appender
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%d %5p [%t] (%F:%L) %c{2} -
%m%n

# MVNO
log4j.appender.MVNO=org.apache.log4j.RollingFileAppender
log4j.appender.MVNO.MaxFileSize=10MB
log4j.appender.MVNO.MaxBackupIndex=10
log4j.appender.MVNO.File=/opt/tomcat/logs/mrm-ws-3a.log
log4j.appender.MVNO.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
log4j.appender.MVNO.layout.ConversionPattern=%d %5p [%t] (%F:%L) %c{2} -
%m%n


Could someone please give me a feedback on this issue?

Thaks a lot!
-- 
View this message in context: http://www.nabble.com/log4j-and-two-webapps-tp17157138p17157138.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@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