feat: add aot-logback, a module that precompiles logback.xml into a Logback Configurator #517
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.68) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.68 · 407 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.068
Real PR Conversation Timeline
1 comments
"Review active on #517"
general
weight: 0.35
alvarosanchez
Without a
Configuratorservice, Logback parseslogback.xmlwith Joran on the main thread at every start. micronaut-projects/micronaut-gradle-plugin#1380 and micronaut-projects/micronaut-maven-plugin#1722 ask to precompile it for every packaging, without an AOT run.This PR adds the shared part, a new module,
aot-logback(io.micronaut.aot:micronaut-aot-logback). The plugins and micronaut-runner callLogbackPrecompiler.precompile(Request)in-process and get aResult(status(),message(),entries(),warnings()). The generatedLogbackConfiguratorsets up Logback without loading Joran orjava.xml. The engine is ported from alvarosanchez/micronaut-runner#201.Behaviour
logback.xmloutside a small subset, a secondlogback.xml, an existingConfigurator, atargetReleasebelow 25, Logback outside[1.5.37, 1.6), or anapplication/bootstrapfile, in the application or a dependency, that may setlogger.configorlogback.configurationFileor usemicronaut.config.import. The guide lists the rest.FAILED; under #516's rules the latter was a stand-down.closedClassPath(true),ClassPathGuardhands over to Joran on any call wherelogback-test.xmlis visible orlogback.xmlis missing or changed.-Dmicronaut.logback.precompiled=false.logger.configthat only Micronaut's environment holds, such as--logger.config=…or distributed configuration, is not applied, even with the opt-out. Pass-Dlogger.configas a JVM option, orLOGGER_CONFIG. From Micronaut 5.3, Micronaut's logging refresh applies such alogger.configitself, whateverConfiguratoris registered: see micronaut-projects/micronaut-core#13400. A packaged file that may enable the distributed configuration client adds a line toResult.warnings().Compatibility
build-logicsplitsaot-projectintoaot-baseplus the platform, since this module publishes no dependency.@Internal, which japicmp exempts, not@Experimental.Testing
Startup (benchmark-large sample, time to first HTTP 200, paired medians with 95% CI; Apple M4 Pro, OpenJDK 25.0.4.1). Measured before the guard re-checked on later calls, which take well under 1 ms.
| Mode | guarded − Joran | guard cost (guarded − closed) |
|---|---|---|
| Uncached, 4 × 30 pairs | −12.7 to −24.5 ms, all CIs exclude 0 | all CIs include 0 |
| JDK AOT cache, 120 pairs | −7.3 ms [−11.4, −2.7] | +0.6 ms [−3.4, +5.5] |
For reviewers
logback.xml.to.java, which, run after precompilation, registers a second configurator; the plugin issues decide which wins.Fixes #516
🤖 Generated with Claude Code