Hi,

I have deployed two applications into same OC4J instance, the version of
OC4J is 10.1.3.1.  

The strange thing is the second applications will ignore it's oc4j
properties, and use the first applications log4j.propeties, here is the
log4j.properties in this two application:

log4j.properties in first application >>
log4j.rootLogger=info, MAIL, R

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

log4j.appender.stdout.layout.ConversionPattern=%d [%t] %5p (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=/test/test.log
log4j.appender.R.DatePattern = '.'yyyy-MM-dd

log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender  
log4j.appender.MAIL.BufferSize=1  
log4j.appender.Mail.Threshold =info
log4j.appender.MAIL.SMTPHost=smtphost.test.com
log4j.appender.mail.from=testu...@test.com
log4j.appender.mail.to=testu...@test.com
log4j.appender.MAIL.Subject=Testing Error Alert 
log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout  
log4j.appender.MAIL.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n  


log4j.properties in second application >>
log4j.rootLogger=info, MAIL, R

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

log4j.appender.stdout.layout.ConversionPattern=%d [%t] %5p (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
log4j.appender.R.File=/test/test2.log
log4j.appender.R.DatePattern = '.'yyyy-MM-dd

log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

log4j.appender.MAIL=org.apache.log4j.net.SMTPAppender  
log4j.appender.MAIL.BufferSize=1  
log4j.appender.Mail.Threshold =info
log4j.appender.MAIL.SMTPHost=smtphost.test.com
log4j.appender.mail.from=testus...@test.com
log4j.appender.mail.to=testus...@test.com
log4j.appender.MAIL.Subject=Testing Error Alert 
log4j.appender.MAIL.layout=org.apache.log4j.PatternLayout  
log4j.appender.MAIL.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n  
-- 
View this message in context: 
http://www.nabble.com/Strange-behaviour-of-log4j-tp21825741p21825741.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to