https://github.com/elf4j/elf4j-jul
An adapter to use java.util.logging as service provider and runtime logging engine for the ELF4J (Easy Logging Facade for Java) API
https://github.com/elf4j/elf4j-jul
java java-logging java-logging-facade jdk-logging logging logging-facade logging-framework logging-library spi spi-provider
Last synced: 3 days ago
JSON representation
An adapter to use java.util.logging as service provider and runtime logging engine for the ELF4J (Easy Logging Facade for Java) API
- Host: GitHub
- URL: https://github.com/elf4j/elf4j-jul
- Owner: elf4j
- License: mit
- Created: 2022-10-25T02:47:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-28T02:11:54.000Z (over 1 year ago)
- Last Synced: 2025-07-06T18:59:21.826Z (7 months ago)
- Topics: java, java-logging, java-logging-facade, jdk-logging, logging, logging-facade, logging-framework, logging-library, spi, spi-provider
- Language: Java
- Homepage: https://elf4j.github.io/elf4j-jul/
- Size: 111 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elf4j-jul
An adapter to use [java.util.logging](https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html) as
service provider and runtime logging engine for the [ELF4J](https://github.com/elf4j/elf4j) (Easy Logging Facade for
Java) API
## User Story
As an application developer using the [ELF4J](https://github.com/elf4j/elf4j) API, I want to have the option of
selecting [java.util.logging](https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html) (JUL) as my
log engine, at application deploy time without code change or re-compile.
## Prerequisite
Java 8+
## Get It...
[](https://search.maven.org/search?q=g:%22io.github.elf4j%22%20AND%20a:%22elf4j-jul%22)
## Use It...
If you are using the [ELF4J API](https://github.com/elf4j/elf4j) for logging, and wish to select or change to use
java.util.logging as the run-time implementation, then simply pack this service provider in the classpath when the
application deploys. No code change needed. At compile time, the client code is unaware of this run-time logging service
provider. With the ELF4J facade, opting for java.util.logging as the logging implementation is a deployment-time
decision.
The
usual [java.util.logging configuration](https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html#a1.8)
applies.
With Maven, in addition to use compile-scope on the [ELF4J API](https://github.com/elf4j/elf4j) dependency, an end-user
application would use runtime-scope for this provider as a dependency:
```html
io.github.elf4j
elf4j
compile
io.github.elf4j
elf4j-jul
runtime
```
Note: Only one logging provider such as this should be in effect at run-time. If multiple providers end up in the final
build of an application, somehow, then the `elf4j.service.provider.fqcn` system property will have to be used to select
the desired provider.
```
java -Delf4j.service.provider.fqcn="elf4j.jul.JulLoggerFactory" -jar MyApplication.jar
```