You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "VanIngen, Erik (ESTG)" <Er...@fao.org> on 2007/12/03 13:04:49 UTC

webproject does not find log4j.properties

Hi all,

My log4j.properties is located in 
src/test/resources/log4j.properties

Loglevel is set to ERROR

During the test, all logging is done on INFO level, e.g. it seems that log4j
does not find the log4j.properties. 

Is there something I can do more? Thanks for your help. 

Kind Regards,
Erik






Re: webproject does not find log4j.properties

Posted by Guillaume Lederrey <gu...@gmail.com>.
I have never understood completely how Log4J and JCL interact. I found
that following "http://wiki.apache.org/commons/How_to_Configure_the_Logging_Factory_and_the_Logging_Class"
and adding a commons-logging.properties file with
org.apache.commons.logging.Log = org.apache.commons.logging.impl.Log4JLogger
seems to help.

Good luck !

On 05/12/2007, Adam Hardy <ad...@cyberspaceroad.com> wrote:
> VanIngen, Erik (ESTG) on 03/12/07 12:04, wrote:
> > Hi all,
> >
> > My log4j.properties is located in
> > src/test/resources/log4j.properties
> >
> > Loglevel is set to ERROR
> >
> > During the test, all logging is done on INFO level, e.g. it seems that log4j
> > does not find the log4j.properties.
>
> It could be many things. Presumably you have log4j configured as a dependency.
> Also, you are testing in mvn on the cmd line and not in Eclipse or your IDE?
>
> Ignorantly, I can't see how log4j is initialising itself in the test run - I'm
> using commons-logging, maybe that's why.
>
> Also I assume you have not foobarred your log4j.properties? 'Loglevel' doesn't
> sound encouraging. Your main logging statements should be enabled so
>
> log4j.category.org.permacode=WARN
>
> along with appropriate appenders.
>
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Jabber : gehel@amessage.ch
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.wordpress.com/
* http://rwandatech.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: webproject does not find log4j.properties

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
VanIngen, Erik (ESTG) on 03/12/07 12:04, wrote:
> Hi all,
> 
> My log4j.properties is located in 
> src/test/resources/log4j.properties
> 
> Loglevel is set to ERROR
> 
> During the test, all logging is done on INFO level, e.g. it seems that log4j
> does not find the log4j.properties. 

It could be many things. Presumably you have log4j configured as a dependency. 
Also, you are testing in mvn on the cmd line and not in Eclipse or your IDE?

Ignorantly, I can't see how log4j is initialising itself in the test run - I'm 
using commons-logging, maybe that's why.

Also I assume you have not foobarred your log4j.properties? 'Loglevel' doesn't 
sound encouraging. Your main logging statements should be enabled so

log4j.category.org.permacode=WARN

along with appropriate appenders.

Adam

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org