Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

 « Return to Thread: log4jResource setting in GBean: ApplicationLog4jConfigurationGBean

Re: log4jResource setting in GBean: ApplicationLog4jConfigurationGBean

by lvdpal :: Rate this Message:

Reply to Author | View in Thread

Well attaching the whole application might be a bit overwhelming. It's a multi-module Maven project. I'm using an aspectJ library to weave in the logging code into several of my modules. This is working, because I am seeing the logging, only it is logging in geronimo.log and based on my log4j.properties I'm expecting it to log into a logfile of my own.

My Geronimo version is 2.1.4 based on Jetty.

This is my log4j.properties file:

# Set root logger level to DEBUG and its only appender to LOGFILE.
#log4j.rootLogger=INFO, CONSOLE
log4j.logger.nl.lunaris.bookdb=DEBUG, LOGFILE

# CONSOLE is set to be a ConsoleAppender
#log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
#log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
#log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

# LOGFILE is set to be a FileAppender.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=C:/Projects/Boekenplank/logs/booklog.txt
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n


I had tried to log everything else to console first, but then I read that I can't use the rootLogger (because Geronimo uses that), so I commented that logger out.

 « Return to Thread: log4jResource setting in GBean: ApplicationLog4jConfigurationGBean