ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Novotny <novo...@aei.mpg.de>
Subject an ant task that does logging
Date Fri, 03 Dec 2004 14:35:51 GMT

Hi,

    I'm trying to run an Ant task which uses Log4J (maybe 
commons-logging as well) and I get this:

create-database:
   [dbtask] log4j:WARN No appenders could be found for logger 
(org.gridlab.gridsphere.core.persistence.hibernate.DBTask).
   [dbtask] log4j:WARN Please initialize the log4j system properly.

The task looks like:

<target name="create-database" depends="configure-database, jar">
        <taskdef name="dbtask"
            
classname="org.gridlab.gridsphere.core.persistence.hibernate.DBTask"
            classpathref="classpath"/>
        <dbtask
            configdir="${env.CATALINA_HOME}/webapps/gridsphere"
            action="CREATE"/>
    </target>

So far, the only thing that worked is a hack I added to the DBTask code 
which actually uses the Log4J PropertyConfigurator static initializer:

PropertyConfigurator.configure(configDir + 
"/WEB-INF/classes/log4j.properties");

I also tried placing a log4j.properties file in the classpath, but that 
didn't work either.... any other ideas are greatly appreciated!

    Thanks, Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message