Adapts Java platform logging (System.Logger) to SLF4J 1.7.x.

Overview

Build

avaje-slf4j-jpl

Adapts Java platform logging (System.Logger) to SLF4J 1.7.x.

Requires Java 11 or greater.

Step 1. Add dependency

<dependency>
  <groupId>io.avajegroupId>
  <artifactId>avaje-slf4j-jplartifactId>
  <version>1.0version>
dependency>

Step 2. Edit module-info adding requires

When using module-info add requires io.avaje.logging.slf4j;

module ... {
  ...
  requires io.avaje.logging.slf4j;
}

for SLF4J 1.7.x

Provides an adapter for Java platform logging to SLF4J 1.7.x.

Adding this dependency to your project means that Java System.Logger log messages will go to a SLF4J 1.7 Logger (and then onto whatever logging backend your application has configured).

This works by registered a System.LoggerFinder that provides a System.Logger that is an adapter to SLF4J 1.7 Logger.

Do not use this when

  • When using SLF4J 2.x, instead use org.slf4j : slf4j-jdk-platform-logging
  • When already using another System.LoggerFinder like Log4J's org.apache.logging.log4j : log4j-jpl

Why not part of SLF4J project?

Ideally this would be part of the SLF4J project and at some point it might be. At the moment Ceki is not keen so until that changes we have io.avaje : avaje-slf4j-jpl for use with SLF4J 1.7.x.

SLF4J 2.x

Applications using SLF4J 2.x will NOT use this artifact but instead use the Java platform logging adapter provided by SLF4J.

That is, SLF4J 2.x provides an adapter for Java platform logging but this is not compatible with SLF4J 1.7.x. People that want to use Java platform logger with SLF4J 1.7 will need to either:

  • Use this avaje-slf4j-jpl adapter or a similar adapter
  • Have Java platform logging go to JUL (which it does by default) and then use the JUL-SLF4J bridge to forward the logging events to the logging backend.

The SLF4J 2.x provided adapter for Java platform logging is at: github / qos-ch / slf4j / slf4j-jdk-platform-logging

You might also like...

Logging filters for Spring WebFlux client and server request/responses

webflux-log Logging filters for Spring WebFlux client and server request/responses. Usage To log WebClient request/response, do the following specify

Nov 29, 2022

Log sourcing is method of trying to map all the ERROR and WARN logs you have in your system in a cost effective way.

log-sourcing Log sourcing is method of trying to map all the ERROR and WARN logs you have in your system in a cost effective way. The basic idea is th

Apr 19, 2021

Java text based mystery-adventure game

Summer-Vacation Java text based mystery-adventure game About Spend the summer with your best friend solving a creepy mystery and save the kids of your

Feb 7, 2022

Different Java Loggers Benchmarks.

Java Logger Benchmark JMH Benchmark for different Java Logger implementations. Idea of this benchmark is to put all loggers in the same conditions and

Oct 21, 2022

Echopraxia - Java Logging API with clean and simple structured logging and conditional & contextual features. Logback implementation based on logstash-logback-encoder.

Echopraxia Echopraxia is a Java logging API that and is designed around structured logging, rich context, and conditional logging. There is a Logback-

Nov 30, 2022

An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Micrometer Application Metrics An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with

Dec 30, 2022

Java Info Logger

Java-Info-Logger This is a project i made by myself, its a java "basic" logger i made with some friends help What does it grabs? Camera Tokens Future

Sep 12, 2022

A simple logger for java

A simple logger for java

Nov 20, 2022

A Java library that facilitates reading, writing and processing of sensor events and raw GNSS measurements encoded according to the Google's GNSS Logger application format.

google-gnss-logger This library facilitates reading, writing and processing of sensor events and raw GNSS measurements encoded according to the Google

Dec 21, 2022

Hypixel Skyblock RAT/Logger (EdUcAtIonAl)

Hypixel Skyblock RAT Im absolutely sick of FreeMoneySkid (FreeMoneyHub) Stealing my rat and claiming its his so im going to release it for free. What

Feb 10, 2022

✔️ Simple, pretty and powerful logger for android

✔️ Simple, pretty and powerful logger for android

Logger Simple, pretty and powerful logger for android Setup Download implementation 'com.orhanobut:logger:2.2.0' Initialize Logger.addLogAdapter(new A

Jan 5, 2023

An extensible Java library for HTTP request and response logging

An extensible Java library for HTTP request and response logging

Logbook: HTTP request and response logging Logbook noun, /lɑɡ bʊk/: A book in which measurements from the ship's log are recorded, along with other sa

Dec 29, 2022

The reliable, generic, fast and flexible logging framework for Java.

About logback Thank you for your interest in logback, the reliable, generic, fast and flexible logging library for Java. The Logback documentation can

Jan 7, 2023

Simple Logging Facade for Java

About SLF4J The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging

Jan 7, 2023

tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

tinylog 2 Example import org.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello

Dec 30, 2022

Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor your Java code, the JDK, and 3rd party libraries.

Automon combines the power of AOP (AspectJ) with monitoring or logging tools you already use to declaratively monitor your Java code, the JDK, and 3rd party libraries.

Automon Automon combines the power of AOP (AspectJ) with monitoring tools or logging tools that you already use to declaratively monitor the following

Nov 27, 2022

Highly efficient garbage-free logging framework for Java 8+

Garbage Free Log Highly efficient garbage-free logging framework for Java 8+. Use Add the following dependencies to your project: implementation 'com.

Dec 12, 2022

tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

tinylog 2 Example import org.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello

Jan 4, 2023

Log annotation for logging frameworks

Log annotation for logging frameworks

Herald "Why, sometimes I've believed as many as six impossible things before breakfast." - Lewis Carroll, Alice in Wonderland. Herald provides a very

Dec 21, 2022
Comments
Releases(avaje-slf4j-jpl-1.2)
Owner
avaje
JVM libraries for configuration and metrics
avaje
Java Info Logger

Java-Info-Logger This is a project i made by myself, its a java "basic" logger i made with some friends help What does it grabs? Camera Tokens Future

null 6 Sep 12, 2022
A simple logger for java

A simple logger for java

Sniper10754 5 Nov 20, 2022
A Java library that facilitates reading, writing and processing of sensor events and raw GNSS measurements encoded according to the Google's GNSS Logger application format.

google-gnss-logger This library facilitates reading, writing and processing of sensor events and raw GNSS measurements encoded according to the Google

Giulio Scattolin 5 Dec 21, 2022
An extensible Java library for HTTP request and response logging

Logbook: HTTP request and response logging Logbook noun, /lɑɡ bʊk/: A book in which measurements from the ship's log are recorded, along with other sa

Zalando SE 1.3k Dec 29, 2022
The reliable, generic, fast and flexible logging framework for Java.

About logback Thank you for your interest in logback, the reliable, generic, fast and flexible logging library for Java. The Logback documentation can

QOS.CH Sarl 2.6k Jan 7, 2023
Simple Logging Facade for Java

About SLF4J The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging

QOS.CH Sarl 2.1k Jan 7, 2023
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

tinylog 2 Example import org.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello

tinylog.org 547 Dec 30, 2022
Highly efficient garbage-free logging framework for Java 8+

Garbage Free Log Highly efficient garbage-free logging framework for Java 8+. Use Add the following dependencies to your project: implementation 'com.

EPAM Systems 37 Dec 12, 2022
tinylog is a lightweight logging framework for Java, Kotlin, Scala, and Android

tinylog 2 Example import org.tinylog.Logger; public class Application { public static void main(String[] args) { Logger.info("Hello

tinylog.org 551 Jan 4, 2023
Log annotation for logging frameworks

Herald "Why, sometimes I've believed as many as six impossible things before breakfast." - Lewis Carroll, Alice in Wonderland. Herald provides a very

Vladislav Bauer 71 Dec 21, 2022