You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "tgummerer (via GitHub)" <gi...@apache.org> on 2026/10/07 07:20:26 UTC
[I] 3.10 seems to ignore `-Dorg.slf4j.simpleLogger.logFile=System.err` [maven]
tgummerer opened a new issue, #13380:
URL: https://github.com/apache/maven/issues/13380
### Affected version
3.10.0
### Bug description
In maven 3.10.0, passing `-Dorg.slf4j.simpleLogger.logFile=System.err` no longer seems to move log output to stderr, but continues to write it to stdout.
```
$ mvn --version
Apache Maven 3.9.16 (2bdd9fddda4b155ebf8000e807eb73fd829a51d5)
Maven home: /usr/share/java/maven
Java version: 21.0.12.1, vendor: Arch Linux, runtime: /usr/lib/jvm/java-21-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "7.2.7-arch1-1", arch: "amd64", family: "unix"
$ mvn -Dorg.slf4j.simpleLogger.logFile=System.err validate 2>/dev/null
$ mvn --version
Apache Maven 3.10.0 (c43a36b8d67be7e0805a411bc0898af1a51f5472)
Maven home: /tmp/claude-1000/-home-tgummerer-work-pulumi-25081/c7733082-de92-46c6-80f7-5fe0a24dfd88/scratchpad/javarepro/apache-maven-3.10.0
Java version: 21.0.12.1, vendor: Arch Linux, runtime: /usr/lib/jvm/java-21-openjdk
Default locale: en_US, platform encoding: UTF-8, time zone: Europe/Madrid
OS name: "linux", version: "7.2.7-arch1-1", arch: "amd64", family: "unix"
$ mvn -Dorg.slf4j.simpleLogger.logFile=System.err validate 2>/dev/null
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.pulumi:proj >---------------------------
[INFO] Building proj 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.065 s
[INFO] Finished at: 2026-10-07T09:18:33+02:00
[INFO] ------------------------------------------------------------------------
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 3.10 seems to ignore `-Dorg.slf4j.simpleLogger.logFile=System.err` [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #13380: 3.10 seems to ignore `-Dorg.slf4j.simpleLogger.logFile=System.err`
URL: https://github.com/apache/maven/issues/13380
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 3.10 seems to ignore `-Dorg.slf4j.simpleLogger.logFile=System.err` [maven]
Posted by "CyberNativeAI (via GitHub)" <gi...@apache.org>.
CyberNativeAI commented on issue #13380:
URL: https://github.com/apache/maven/issues/13380#issuecomment-6064280334
Reproduced on 3.10.0 vs 3.9.16 (Apache binary tarballs, sha512 verified; Temurin 21.0.12, linux/amd64, Docker), with stdout and stderr captured separately.
`mvn -Dorg.slf4j.simpleLogger.logFile=System.err validate`: 3.9.16 gives stdout 0 B / stderr 572 B; 3.10.0 gives stdout 572 B / stderr 0 B, identical to a run without the property. Same with stdout as a pipe or a file.
It is not only the logger. Under 3.10.0, `System.err.println` from an `exec:java` main class also lands on fd 1, although `/proc/self/fd/2` is still the real stderr. In both versions System.out and System.err are Ansi print streams. In 3.10.0 (`org.jline.jansi.AnsiConsole`) both are built from `Terminal.output()`, and `MavenCli.main` -> `MessageUtils.systemInstall()` builds that terminal with `systemOutput(SysOut)`. I read this from the shipped bytecode; I did not patch Maven.
Workarounds on 3.10.0 that keep Maven's own log off stdout (10/10 runs each, stdout pipe and file): `-Dorg.slf4j.simpleLogger.logFile=/dev/stderr` (also via MAVEN_OPTS), `-B`, `--color=never`, and `-q` (drops INFO/WARNING). `-B` and `--color=never` skip the `MessageUtils.getTerminal()` call in the default `auto` branch of `MavenCli.logging()`. That fits the data; I did not instrument it.
No tested workaround restores direct `System.err` writes to fd 2. These had no effect: `-Djline.terminal.type=dumb`, `-Dorg.jline.terminal.type=dumb`, `-Dorg.jline.terminal.output=err|forced-err`, `-Dorg.jline.terminal.providers=dumb`, `-Djansi.mode=strip`. In the bytecode, `TerminalBuilder.computeSystemOutput()` only reads `org.jline.terminal.output` when the builder's value is null.
A stub of the Pulumi plugin call (`compile exec:java`, port printed on stdout, one javac deprecation `[WARNING]`): first stdout line is `[WARNING] ...` on 3.10.0 and `12345` on 3.9.16 and with each workaround above. Real Pulumi was not run.
Not tested: macOS, Windows, a TTY stdout, Maven 4.x, the GitHub runner image.
AI-assisted check by CyberNative AI LLC; this comment is AI-generated.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 3.10 seems to ignore `-Dorg.slf4j.simpleLogger.logFile=System.err` [maven]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #13380:
URL: https://github.com/apache/maven/issues/13380#issuecomment-6149228841
The root cause has been fixed in JLine 4.4.8 (released 2026-10-09) via [jline/jline3#2317](https://github.com/jline/jline3/pull/2317).
`AnsiConsole.ansiStream()` was unconditionally using `terminal.output()` as the backing stream for both `out` and `err`, which silently redirected the non-terminal-backed stream to the wrong fd. The fix routes each stream to its correct fd: the terminal-backed stream keeps `terminal.output()`, while the other uses the original system stream.
Bumping Maven's JLine dependency to 4.4.8 will resolve this issue without any Maven-side workaround needed. Closing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org