gnodet opened a new pull request, #13695:
URL: https://github.com/apache/maven/pull/13695

   ## Summary
   
   Redesigns the Maven logging stack so the default path is SLF4J-free, with 
`LoggerManager` as the single entry point.
   
   - **`LoggerManager`** (maven-api-log) — central interface: `getLogger()`, 
`getLogSink()`/`setLogSink()`, `isLevelEnabled()`, `setRootLoggerLevel()`, 
`reconfigure()`, `hasReached()`
   - **`DefaultLoggerManager`** (maven-logging) — owns level config (extracted 
from `SimpleLoggerConfiguration`), sink management with accumulating bootstrap 
buffer, severity tracking, and cached level lookups. **Zero SLF4J dependency.**
   - **`DefaultLogger`** — obtains sink from `LoggerManager.get()` on each 
dispatch (supports runtime sink changes). Fluent `LogEventBuilder` passes raw 
template + args to `DefaultLogEvent` for lazy formatting.
   - **JUL handler** — dispatches directly through `LoggerManager`, eliminating 
the `maven-logging-jul` → `maven-logging-slf4j` dependency
   - **Async event queue** — moved from string output (`AsyncDrainWriter`) to 
`LogEvent` level inside `ProjectBuildLogAppender`, deferring formatting to the 
drain thread
   
   ### Removed
   - `LogLevelRecorder` interface + `DefaultLogLevelRecorder` — absorbed into 
`LoggerManager.hasReached()`
   - `Slf4jConfiguration` chain (5 classes + properties file)
   - `LogSink.isEnabled()` — level checking centralized in `LoggerManager`
   - `SlfLogEvent` — all paths use `DefaultLogEvent`
   - `AsyncDrainWriter` — replaced by lock-free queue in 
`ProjectBuildLogAppender`
   
   ### Renamed
   - `Log` → `Logger`, `LogBuilder` → `LogEventBuilder`
   
   ### Dependency graph
   ```
   maven-api-log          (API)
          |
   maven-logging          (impl, zero SLF4J)
         / \
     slf4j   jul (thin adapters, jul is also SLF4J-free)
   ```
   
   ## Test plan
   - [ ] `mvn test -pl 
impl/maven-logging,impl/maven-logging-slf4j,impl/maven-logging-jul` — all unit 
tests pass
   - [ ] `mvn test -pl impl/maven-cli -Dtest=LookupInvokerLoggingTest` — CLI 
logging test passes
   - [ ] `grep -r "org.slf4j" impl/maven-logging/src/` returns nothing
   - [ ] `grep -r "org.slf4j" impl/maven-logging-jul/src/` returns nothing
   - [ ] Verify `-X` debug logging works end-to-end
   - [ ] Verify `--fail-on-severity warn` works end-to-end
   - [ ] Verify parallel build logging (no contention, ordered output)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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