It is in src/test/resources. It is getting picked up since the logging
is changing when I change values in it. Either way, my logs are being
logged to the System.out but not appearing it the system out element
in the TEST-TestSuite.xml, which I find odd.
I would try it without forking to see if it is a classloader issue
with commons logging or log4j, but unfortunately I have to fork since
my code is JDK 1.6 and mvn has to run on 1.5 (due to some severe bugs
with collections and depending on hashmap ordering in 2.0.8).
-Andrew
On Jan 2, 2008 12:46 AM, Jeff MAURY <[EMAIL PROTECTED]> wrote:
> Andrew,
>
> where is you your test-log4j.xml file located ? Because if you use
> log4j.configuration, I think it will use the current directory and not try
> to load the file from the classpath.
>
> Jeff
>
>
> On Jan 2, 2008 3:38 AM, Andrew Robinson <[EMAIL PROTECTED]>
> wrote:
>
>
> > I am having problems getting useful information from surefire logs.
> > Plugin declaration:
> >
> > <artifactId>maven-surefire-plugin</artifactId>
> > <version>2.4-SNAPSHOT</version>
> > <configuration>
> > <forkMode>once</forkMode>
> > <parallel>false</parallel>
> > <redirectTestOutputToFile>true</redirectTestOutputToFile>
> > <forkMode>once</forkMode>
> > <jvm>${JAVA16_HOME}/bin/java</jvm>
> > <workingDirectory>${project.build.directory}</workingDirectory>
> > <includes>
> > <include>**/*Test.java</include>
> > </includes>
> > <systemProperties>
> > <property>
> > <name>log4j.configuration</name>
> > <value>test-log4j.xml</value>
> > </property>
> > </systemProperties>
> > </configuration>
> >
> > In the target/surefire-reports I have:
> >
> > TestSuite.txt: has the exceptions that TestNG caught, but no logging
> > TestSuite-output.txt: has the full output except for what TestNG
> > caught and test information
> > TEST-TestSuite.xml: has all information that does not use JDK logging,
> > commons logging or Log4J (has hibernate SQL, so I know it is picking
> > up some of the System.out contents)
> > testng-results.xml: Same as TestSuite.txt for the most part
> > testng-failed.xml: this file is not for logging
> >
> > TEST-TestSuite.xml would be great if it held the contents of the
> > logging output, but it does not for some reason. I can't find anything
> > to be able to get it to be picked up in this file. I have a lot of
> > test cases already and trying to sift through the full log and attempt
> > to try to figure out what test method the logs are for is just not
> > possible. How can I get the surefire test logs per method to contain
> > the information logged by log4j?
> >
> > Here is my test-log4j.xml file contents:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
> >
> > <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
> > debug="false">
> >
> > <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
> > <param name="Target" value="System.out"/>
> >
> > <layout class="org.apache.log4j.PatternLayout">
> > <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p
> > [%c{1}] %m%n"/>
> > </layout>
> > </appender>
> >
> > <root>
> > <priority value="INFO"/>
> > <appender-ref ref="CONSOLE"/>
> > </root>
> >
> > </log4j:configuration>
> >
> >
> > Thanks,
> > Andrew
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> La mélancolie c'est communiste
> Tout le monde y a droit de temps en temps
> La mélancolie n'est pas capitaliste
> C'est même gratuit pour les perdants
> La mélancolie c'est pacifiste
> On ne lui rentre jamais dedans
> La mélancolie oh tu sais ça existe
> Elle se prend même avec des gants
> La mélancolie c'est pour les syndicalistes
> Il faut juste sa carte de permanent
>
> Miossec (2006)
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]