struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuch...@gic.com.sg
Subject Re: log4j prints out twice
Date Fri, 30 Apr 2004 08:49:19 GMT

Is it because you specify two loggers?

log4j.rootLogger=ERROR,rolling
log4j.logger.org.zack =DEBUG, rolling

I guess you need to put

log4j.additivity.org.zack=false

XU CHENG
EXT: 8476
DID: (65) 68898476



                                                                                         
                                             
                      Johannes Wolfgang                                                  
                                             
                      Woger                    To:       Struts Users Mailing List <user@struts.apache.org>
                           
                      <jwwoger@chello.a        cc:                                    
                                                
                      t>                       Subject:  log4j  prints out twice      
                                                
                                                                                         
                                             
                      04/30/2004 02:02                                                   
                                             
                      AM                                                                 
                                             
                      Please respond to                                                  
                                             
                      "Struts Users                                                      
                                             
                      Mailing List"                                                      
                                             
                                                                                         
                                             
                                                                                         
                                             




Hi,
logging with log4j prints out one message twice into my log file.

here is log4j.properties

#levels: error, fatal
log4j.rootLogger=ERROR,rolling
log4j.logger.org.zack =DEBUG, rolling

log4j.appender.rolling=org.apache.log4j.RollingFileAppender
log4j.appender.rolling.File=/usr/local/tomcat5019/logs/ExtManager_IB.log
log4j.appender.rolling.MaxFileSize=300KB
log4j.appender.rolling.MaxBackupIndex=3
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

code is not executed twice, since a
servlet.getServletContext().log("text"); only show up once

any suggestions?

Wolfgang




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


Mime
View raw message