AnsweredAssumed Answered

LOG4J

Question asked by sgomes on Jun 12, 2007
Hi!

in my file log4j.properties i have….

log4j.rootLogger=error, Console, File, XPTO

log4j.appender.File=org.apache.log4j.DailyRollingFileAppender
log4j.appender.File.File=alfresco.log
log4j.appender.File.Append=true
log4j.appender.File.DatePattern='.'yyyy-MM-dd
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n

log4j.appender.XPTO=org.apache.log4j.DailyRollingFileAppender
log4j.appender.XPTO.File=intranet.log
log4j.appender.XPTO.Append=true
log4j.appender.XPTO.DatePattern='.'yyyy-MM-dd
log4j.appender.XPTO.layout=org.apache.log4j.PatternLayout
log4j.appender.XPTO.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c] %m%n


in my class…how i can write a log only for the file intranet.log ???

i have… log.info("USER"+this.username);

Outcomes