OK, I'm getting the hang of this.
I'm trying to get a global log file for any log4j stuff, then a file for my application logged, then a file for hibernate. I have this in log4j.properties
Code:
log4j.rootLogger=debug,default
log4j.logger.ca.gc.publiservice.boardroom=debug,boardroom
log4j.logger.org.hibernate=debug,hibernate
log4j.appender.default=org.apache.log4j.FileAppender
log4j.appender.default.File=C:\\Program Files\\WebSphere\\AppServer\\installedApps\\lithium\\BoardroomFinder.ear\\boardroom.war\\master.log
log4j.appender.default.layout=org.apache.log4j.SimpleLayout
log4j.appender.default.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.appender.boardroom=org.apache.log4j.FileAppender
log4j.appender.boardroom.File=C:\\Program Files\\WebSphere\\AppServer\\installedApps\\lithium\\BoardroomFinder.ear\\boardroom.war\\boardroom.log
log4j.appender.boardroom.layout=org.apache.log4j.SimpleLayout
log4j.appender.boardroom.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.appender.hibernate=org.apache.log4j.FileAppender
log4j.appender.hibernate.File=C:\\Program Files\\WebSphere\\AppServer\\installedApps\\lithium\\BoardroomFinder.ear\\boardroom.war\\hibernate.log
log4j.appender.hibernate.layout=org.apache.log4j.SimpleLayout
log4j.appender.hibernate.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
log4j.logger.org.hibernate=debug
log4j.logger.org.hibernate.SQL=debug
The master.log works, and boardroom.log works too.
However, all the hibernate is still going to master.log, hence the hibernate isn't configured properly.
Does anyone have any hints? Have I missed something simple here?
Thanks,
Greg