maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stig Rohde Døssing (JIRA) <>
Subject [jira] [Created] (SUREFIRE-1659) Log4j logger in TestExecutionListener corrupts Surefire's STDOUT.
Date Tue, 09 Apr 2019 20:27:00 GMT
Stig Rohde Døssing created SUREFIRE-1659:

             Summary: Log4j logger in TestExecutionListener corrupts Surefire's STDOUT.
                 Key: SUREFIRE-1659
             Project: Maven Surefire
          Issue Type: Bug
    Affects Versions: 3.0.0-M3
            Reporter: Stig Rohde Døssing

I have a project that registers a JUnit 5 TestExecutionListener. The TestExecutionListener
contains an SLF4j Logger, using Log4j2 as the underlying library. There is a log4j2.xml on
the classpath, logging to console, and Surefire is set up to redirect output.

Running the tests gives the following result.

[WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1. See FAQ web
page and the dump file ...

I've attached a minimal reproduction.

Doing either of the following eliminates the error:
* Not having the log4j2.xml on the classpath
* Not having the Logger in the TestExecutionListener

This message was sent by Atlassian JIRA

View raw message