Skip to content

Commit

Permalink
Check jul logging is not loaded in jlink
Browse files Browse the repository at this point in the history
  • Loading branch information
agentgt committed Oct 5, 2024
1 parent 1ce7792 commit 78f49c6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ public static void main(String[] args) {
var logger = LoggerFactory.getLogger(Main.class);
logger.info("Hello from Avaje");
logger.debug("Debug from Avaje");
logger.info("java.util.logging loaded: {}", isJulModuleAvailable());

}

private static boolean isJulModuleAvailable() {
ModuleLayer bootLayer = ModuleLayer.boot();
return bootLayer.findModule("java.logging").isPresent();
}

}

0 comments on commit 78f49c6

Please sign in to comment.