Hi, 

 

i have a problem to use log4j for two different application.both appication 
on same server.my problem is
1-- i dont know what to do for that.
2-- if i create two different log4.configure file with same file name place 
in both different application /web-inf/class dir. then it will not create 
log file ( i am using file appander for INFO and ERROR)for that. 

 

i am using
Linux redhat7.2(Kernel 2.4.7-10)
Apache 1.3.02
tomcat4
jdk1.3.1
log4j-1.2rc1 

my configuration settings are 

for that i creat one log4j.configure .this file is present in my application 
/web-inf/class dir.
and creating environment variable 
(CATALINA_OPTS="-Dlog4j.configuration=log4j.configure" ) in my /etc/profile 
dir in linux redhat7.2 

and logj.configure file is 


# Attach appender INFOLOG to root. Set root level to Level.ERROR .
log4j.rootLogger=DEBUG,INFOLOG,ERRORLOG 

# INFOLOG is set to be a FileAppender sending its output to
# System.out. However, only error messages and above will be printed
# in A1 because INFOLOG's threshold is set to Level.ERROR.
#File Appander
log4j.appender.INFOLOG=org.apache.log4j.FileAppender
log4j.appender.INFOLOG.Threshold=INFO
#pattern layout
log4j.appender.INFOLOG.layout=org.apache.log4j.PatternLayout 

log4j.appender.INFOLOG.File=AcdInfo.log
log4j.appender.INFOLOG.MaxFileSize=100KB
# Keep one backup file
log4j.appender.INFOLOG.MaxBackupIndex=1
log4j.appender.INFOLOG.layout.ConversionPattern=%d %-5p [%t] %c{2} - %m%n 

# for ERRORLOG
# Appender  ERRORLOG  writes to the file "test.log" in user's home. 

log4j.appender.ERRORLOG=org.apache.log4j.FileAppender
log4j.appender.ERRORLOG.layout=org.apache.log4j.PatternLayout 

log4j.appender.ERRORLOG.Threshold=ERROR
log4j.appender.ERRORLOG.File=AcdError.log 

log4j.appender.ERRORLOG.MaxFileSize=100KB
# Keep one backup file
log4j.appender.ERRORLOG.MaxBackupIndex=1 


# Pattern to output the caller's file name and line number.
log4j.appender.ERRORLOG.layout.ConversionPattern=%d %-5p [%t] %-17c{2} 
(%13F:%L) %3x - %m%n 

 

 

so please help 


prashant sharma
sofware engineer
Euro Rscg sogo Networks Pvt ltd,mumbai

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to