java - Duplicated log4j logs in Glassfish server.log -
i have several war files each representing unique application, deployed 1 glassfish domain instance. im using log4j logging , have bundled jar each war file , im trying have each application log messages different log4j log file file.
now challenge messages being logged each applications log files , additionally glassfish's server.log file. how can ensure messages logged respective log files , not glassfish's server.log without turning off logging glassfish's server.log glassfish's system events continue logged server.log whilst applications events logged distinct log files.
below log4.properties file
log4j.rootlogger=debug, mylogger log4j.appender.mylogger=debug,mylogger log4j.additivity.mylogger=false log4j.appender.mylogger=org.apache.log4j.rollingfileappender log4j.appender.mylogger.file=c:/applogs/myapplogger.log log4j.appender.mylogger.datepattern='.'dd-mmm-yyyy log4j.appender.mylogger.layout=org.apache.log4j.patternlayout log4j.appender.mylogger.layout.conversionpattern=[%p] %d{dd-mmm-yyyy hh:mm:ss,sss} %c %m - %m%n log4j.appender.mylogger.maxfilesize=512kb log4j.appender.mylogger.maxbackupindex=10
i think got line wrong
log4j.appender.mylogger=debug,mylogger
try replacing with
log4j.appender.mylogger=debug
Comments
Post a Comment