geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvdpal <lvd...@lunaris-informatica.nl>
Subject Re: log4jResource setting in GBean: ApplicationLog4jConfigurationGBean
Date Fri, 10 Jul 2009 06:43:03 GMT

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.
-- 
View this message in context: http://www.nabble.com/log4jResource-setting-in-GBean%3A-ApplicationLog4jConfigurationGBean-tp23936783s134p24422544.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message