You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ricardo Gladwell <ri...@btinternet.com> on 2004/09/20 18:59:12 UTC

Using commons-logging w/Maven/Junit

Hi,

I don't seem to be able to get my commons-logging statements to display 
to the stdout durnig JUnit tests. My POM contains:

         <unitTest>
             <includes>
                 <include>**/*Test.java</include>
             </includes>
             <resources>
                 <resource>
                     <directory>${basedir}/test</directory>
                     <includes>
                         <include>**/*.properties</include>
                     </includes>
                     <filtering>false</filtering>
                 </resource>
             </resources>
         </unitTest>

And my log4j.properties is as follows:

log4j.rootCategory=ERROR,stdout
log4j.category.org.apache.taglibs.style=DEBUG

########################################
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%t] %-5p %c{2} - %m %n

Any ideas about how I get this to work?#

Kind regards,
-- Ricardo Gladwell

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


Re: Using commons-logging w/Maven/Junit

Posted by Maury Jarrell <ma...@gmail.com>.
Ricardo,

Here's a log4j properties file that I use:

log4j.rootLogger = info, default 

# "default" appender 
log4j.appender.default=org.apache.log4j.FileAppender 
log4j.appender.default.File=./logs/default.log 
log4j.appender.default.Append=false 
log4j.appender.default.layout=org.apache.log4j.SimpleLayout 

You will get a default.log file in the logs directory with log entries
of level info and above included in it.

I think the "category" stuff you have in yours is from an older
version of log4j.

Hope this helps,
Maury

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