Repository navigation
Maintenance: Consider Using System.Logger as Facade #2245
Description
Activity
Hi @AdamBien, thanks for creating the issue. One of our Java engineers will get back to you soon.
- addedfeature-requestNew feature or requestNew feature or requestand removed
on Oct 30, 2025 Thanks for opening this issue @AdamBien. I had a brief look at
System.Loggerto understand how this integrates with the logging implementations that we support today (logbackandlog4j2).For logback, I found a reference implementation for a bridge from
System.Logger-> SLF4J API -> Logback here: https://github.com/qos-ch/slf4j/tree/master/slf4j-jdk-platform-logging.For Logj42, I couldn't find any official implementations.
However, since your primary motivation here is to remove the external dependency on SLF4J API, we shouldn't bridge through SLF4J.
One path forward might be to implement our own
java.lang.System.LoggerFinderbridge and expose it throughMETA-INF/services/java.lang.System$LoggerFinderfor the service loader inSystem.Loggerto load. This way, we can bridge directly fromSystem.Loggertologback/log4j2which contains the structured logging logic and other features such as log buffering provided by Powertools.This issue requires more scoping because we need to understand in more detail the differences between what SLF4J API can offer vs.
System.Logger. For example, we use the SLF4JMDCto propagate logging context in a thread-safe way which is unclear how this translates toSystem.Logger.We also need to understand the impact on our structured arguments implementation. For example:
// Single structured argument LOGGER.info("Processing order {}", order.getOrderId(), entry("order", order)); // Context enrichment through MDC MDC.put("cardNumber", card.getId()); LOGGER.info("Updating card information"); // JSON will contain cardNumber key value
– https://docs.aws.amazon.com/powertools/java/latest/core/logging/#custom-keys
We will keep this issue as an idea for now to understand the customer interest. Please 👍 this issue to show your interest.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsIdeas
Summary
Java 9 introduced a logging façade, which can be used instead of third-party logging solutions: https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/System/Logger.html. The default implementation is java.util.logging.
Why is this needed?
Using Java's built-in functionality reduces deployment size, lowers startup time, and eliminates vulnerability risks caused by external dependencies.
Which area does this relate to?
Logger
Solution
https://github.com/AdamBien/aws-quarkus-lambda-http-api-cdk-plain/blob/main/lambda/src/main/java/airhacks/lambda/greetings/boundary/GreetingResource.java
Acknowledgment