[ https://issues.apache.org/jira/browse/SUREFIRE-1268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15422503#comment-15422503 ]
Francesco Chicchiriccò commented on SUREFIRE-1268: -------------------------------------------------- I have created https://github.com/ilgrosso/surefire1268 When you run {{mvn clean test}}, you will get an output like as {code} Running net.tirasa.test.surefire1268.BaseTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec - in net.tirasa.test.surefire1268.BaseTest 11:39:56.407 INFO net.tirasa.test.surefire1268.BaseTest - ********* You should not be viewing this from console Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 {code} The like {code} 11:39:56.407 INFO net.tirasa.test.surefire1268.BaseTest - ********* You should not be viewing this from console {code} is supposed to be included in {{target/surefire-reports/net.tirasa.test.surefire1268.BaseTest-output.txt}}, but such file is not created. When commenting out {code} <properties> <property> <name>listener</name> <value>net.tirasa.test.surefire1268.NotDoingSoMuchListener</value> </property> </properties> {code} in the {{pom.xml}}, everything works as expected. Moreover, I have noticed that everything works also if *not* commenting the listener property in the {{pom.xml}} but removing this line {code} private static final Logger LOG = LoggerFactory.getLogger(NotDoingSoMuchListener.class); {code} in the listener class. > With JUnit listener, redirectTestOutputToFile is ignored > -------------------------------------------------------- > > Key: SUREFIRE-1268 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1268 > Project: Maven Surefire > Issue Type: Bug > Components: Junit 4.x support, Maven Surefire Plugin > Affects Versions: 2.19.1 > Environment: Linux > Reporter: Francesco Chicchiriccò > > When specifying, according to [this > doc|http://maven.apache.org/surefire/maven-surefire-plugin/examples/junit.html#Using_Custom_Listeners_and_Reporters], > a JUnit listener, the test output is sent to STDOUT, even though > {{redirectTestOutputToFile}} is set to {{true}}. > This happens with log4j2 configuration for {{SYSTEM_OUT}}, regular > {{System.out.println}} works fine. > With no {{properties}} element, {{redirectTestOutputToFile}} is honored. -- This message was sent by Atlassian JIRA (v6.3.4#6332)