Elffuss BraidHub

kikocis/EDC public

main · 1.2 KiBRenderedRawPermalink
1# JDK Logger Monitor
2
3This extension provides a `Logger` which is an implementation of edc `Monitor` interface. It is based on `java.util.logging` package so it doesn't introduce any additional dependencies. As this extension is based on `MonitorExtension` which means this logger extension will load during the runtime initialization and all monitor logs (including edc core framework) will be forwarded to this logger.
4
5## Usages
6
7To use this logger extension just add this monitor-jdk-logger extension package in your project dependency.
8
9## Logging Configuration
10
11As this extension usages `java.util.logging` so to specify logger handler, format, level etc. provide a java properties file e.g. logging.properties
12
13```text
14handlers = java.util.logging.ConsoleHandler
15.level = INFO
16java.util.logging.ConsoleHandler.level = ALL
17java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
18java.util.logging.SimpleFormatter.format = %1$tF %1$tT %4$s : %5$s %n
19```
20
21To use this file pass it as jvm arguments `-Djava.util.logging.config.file=logging.properties`
22
23## Know limitation
24
25A class level logger cannot be created as current Monitor interface methods does not have class as method arguments . So instead a global or extension level can be used.