-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 3.0.5
- Loading branch information
Showing
5 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
gflog-slf4j/src/main/java/com/epam/deltix/gflog/slf4j/Slf4jBridgeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.epam.deltix.gflog.slf4j; | ||
|
||
import org.slf4j.ILoggerFactory; | ||
import org.slf4j.IMarkerFactory; | ||
import org.slf4j.helpers.BasicMDCAdapter; | ||
import org.slf4j.helpers.BasicMarkerFactory; | ||
import org.slf4j.spi.MDCAdapter; | ||
import org.slf4j.spi.SLF4JServiceProvider; | ||
|
||
public final class Slf4jBridgeProvider implements SLF4JServiceProvider { | ||
|
||
private static final String MAX_SUPPORTED_API_VERSION = "2.0.99"; | ||
|
||
private final Slf4jBridgeFactory loggerFactory = new Slf4jBridgeFactory(); | ||
private final BasicMarkerFactory markerFactory = new BasicMarkerFactory(); | ||
private final BasicMDCAdapter mdcAdapter = new BasicMDCAdapter(); | ||
|
||
@Override | ||
public ILoggerFactory getLoggerFactory() { | ||
return loggerFactory; | ||
} | ||
|
||
@Override | ||
public IMarkerFactory getMarkerFactory() { | ||
return markerFactory; | ||
} | ||
|
||
@Override | ||
public MDCAdapter getMDCAdapter() { | ||
return mdcAdapter; | ||
} | ||
|
||
@Override | ||
public String getRequestedApiVersion() { | ||
return MAX_SUPPORTED_API_VERSION; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
// lazy initialization | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
gflog-slf4j/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.epam.deltix.gflog.slf4j.Slf4jBridgeProvider |