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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -