gnodet commented on PR #12694:
URL: https://github.com/apache/maven/pull/12694#issuecomment-5730916989

   Fixed the Windows CI failure in `MavenITmng4387QuietLoggingTest`.
   
   **Root cause:** In quiet mode (`-q`), the call order in `doInvoke()` is:
   1. `configureLogging()` — sets SLF4J root to ERROR, but JUL handler not yet 
installed
   2. `createTerminal()` — JLine initializes, emitting DEBUG messages via 
`java.util.logging` (`Available providers: exec`, `Using terminal 
ExternalTerminal`, `Grapheme cluster mode: not supported by terminal`)
   3. `activateLogging()` — installs `MavenJulHandler` and sets JUL root to 
`SEVERE`
   
   The JLine terminal-init JUL events fired between steps 1 and 3, before 
`MavenJulHandler` was installed to apply the SLF4J level gate, causing those 
`[DEBUG]` lines to leak into quiet-mode output.
   
   **Fix:** In `configureLogging()`, when quiet mode is detected, eagerly 
install `MavenJulHandler` and set the JUL root level to `SEVERE` before 
`createTerminal()` runs. This is safe — `SEVERE` only blocks events, so it 
cannot trigger the `ConcurrentHashMap.computeIfAbsent` reentrancy flood that 
`Level.ALL` would cause during SLF4J bootstrap. `activateLogging()` still sets 
the JUL level (idempotently for quiet mode).


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to