Giter VIP home page Giter VIP logo

elf4j-slf4j's Introduction

elf4j-slf4j

An adapter to use SLF4J as service provider and runtime log engine for the ELF4J (Easy Logging Facade for Java) API

User story

As an application developer using the ELF4J API, I want to have the option of selecting SLF4J as my log engine, at application deploy time without code change or re-compile.

Prerequisite

  • Java 8+

Get it...

Maven Central

Use it...

If you are using the ELF4J API for logging, and wish to select or change to use SLF4J 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 SLF4J as the logging implementation is a deployment-time decision.

The usual SLF4J configuration applies.

With Maven, in addition to use compile-scope on the ELF4J API dependency, an end-user application would use runtime-scope for this provider as a dependency:

<dependency>
    <groupId>io.github.elf4j</groupId>
    <artifactId>elf4j</artifactId>
    <scope>compile</scope>
</dependency>

<dependency>
    <groupId>io.github.elf4j</groupId>
    <artifactId>elf4j-slf4j</artifactId>
    <scope>runtime</scope>
</dependency>

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.slf4j.Slf4jLoggerFactory" -jar MyApplication.jar

elf4j-slf4j's People

Contributors

dependabot[bot] avatar elf4j avatar q3769 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.