You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Th...@afscn.com on 2005/07/01 23:13:29 UTC

Using Jelly with Log4j

Users,

I am trying to create a plugin for one of the project I work on. This plugin
uses common logging with log4j specified. It seems like its not reading the
log4j.properties that I placed in the base directory of the project [after
echo out the log4j.configuration variable, I notice that Jakarta logging
class seems to read log4j.properties from base directory]. Even though
log4j.configuration points to log4j.properties it does not display out the
debug and trace. The info, warn and error works but the pattern that I
specify in log4j.properties does not take effect, it seems like its getting
the default setting somewhere. I have also tried passing the property file
as a parameter from a batch file with a -D [i.e.
-Dlog4j.configuration=c:\log4j.properties] that does not work either. I am
confident that log4j.properties is correct because I have tested with
*.java. Both of my configuration file is below, any help on this would be
great! thanks

 

Commons-logging.properties

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

 

log4j.properties

log4j.rootLogger=DEBUG, stdout

 

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

 

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

log4j.appender.stdout.layout.ConversionPattern=(%r ms) [%t] %-5p: %c#%M %x:
%m%n

 

 

---------------

Thanh Ta