-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed unit tests relying on old SLF4J "Binder" mechanism
Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
- Loading branch information
Showing
7 changed files
with
116 additions
and
45 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
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
45 changes: 0 additions & 45 deletions
45
internal/utils/pekko/src/test/java/org/slf4j/impl/StaticMDCBinder.java
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
internal/utils/pekko/src/test/java/org/slf4j/impl/StaticMDCServiceProvider.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,60 @@ | ||
/* | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.slf4j.impl; | ||
|
||
import javax.annotation.concurrent.Immutable; | ||
|
||
import org.slf4j.ILoggerFactory; | ||
import org.slf4j.IMarkerFactory; | ||
import org.slf4j.helpers.BasicMarkerFactory; | ||
import org.slf4j.helpers.NOPLoggerFactory; | ||
import org.slf4j.helpers.NOP_FallbackServiceProvider; | ||
import org.slf4j.spi.MDCAdapter; | ||
import org.slf4j.spi.SLF4JServiceProvider; | ||
|
||
/** | ||
* The purpose of this class is to use {@link ObservableMdcAdapter} as MDC adapter for logging. | ||
* | ||
* @since 1.3.0 | ||
*/ | ||
@Immutable | ||
public final class StaticMDCServiceProvider implements SLF4JServiceProvider { | ||
|
||
private final ILoggerFactory loggerFactory = new NOPLoggerFactory(); | ||
private final IMarkerFactory markerFactory = new BasicMarkerFactory(); | ||
|
||
@Override | ||
public ILoggerFactory getLoggerFactory() { | ||
return loggerFactory; | ||
} | ||
|
||
@Override | ||
public IMarkerFactory getMarkerFactory() { | ||
return markerFactory; | ||
} | ||
|
||
@Override | ||
public MDCAdapter getMDCAdapter() { | ||
return ObservableMdcAdapter.getInstance(); | ||
} | ||
|
||
@Override | ||
public String getRequestedApiVersion() { | ||
return NOP_FallbackServiceProvider.REQUESTED_API_VERSION; | ||
} | ||
|
||
@Override | ||
public void initialize() { | ||
// already initialized | ||
} | ||
} |