You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Rodney Schneider <ro...@actf.com.au> on 2002/10/11 07:48:07 UTC

[PATCH] Log4J error starting TDK-2.2b3 newapp

Hi,

After starting a newly generated newapp, I was getting the following error message from Log4J:

log4j:WARN No appenders could be found for logger(org.apache.stratum.component.ComponentLoader).
log4j:WARN Please initialize the log4j system properly.

I was able to resolve this by putting a log4j.properties file in my
WEB-INF/classes directory containing the following lines:

log4j.category.org.apache.stratum.component.ComponentLoader = ALL, org.apache.stratum.component.ComponentLoader
log4j.appender.org.apache.stratum.component.ComponentLoader = org.apache.log4j.FileAppender
log4j.appender.org.apache.stratum.component.ComponentLoader.file = ./logs/turbine.log
log4j.appender.org.apache.stratum.component.ComponentLoader.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.stratum.component.ComponentLoader.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.org.apache.stratum.component.ComponentLoader.append = false

However, after thinking about this some more, and noticing that
Torque and Fulcrum also use Log4J for logging, I thought it would
be better to put all these configuration properties in
TurbineResources.properties, rather than requiring a separate
log4j.properties file.

So, I patched TurbineLoggingService to allow Log4J to be configured
from TurbineResources.properties.

The patches are attached.

Regards,

-- Rodney