-
Notifications
You must be signed in to change notification settings - Fork 31
Upgrade SLF4J to 2.x #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Upgrade SLF4J to 2.x #216
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
65 changes: 65 additions & 0 deletions
65
openam-slf4j/src/main/java/org/forgerock/openam/slf4j/AMSlf4jServiceProvider.java
This file contains hidden or 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,65 @@ | ||
| /* | ||
| * The contents of this file are subject to the terms of the Common Development and | ||
| * Distribution License (the License). You may not use this file except in compliance with the | ||
| * License. | ||
| * | ||
| * You can obtain a copy of the License at legal/CDDLv1.1.txt. See the License for the | ||
| * specific language governing permission and limitations under the License. | ||
| * | ||
| * When distributing Covered Software, include this CDDL Header Notice in each file and include | ||
| * the License file at legal/CDDLv1.1.txt. If applicable, add the following below the CDDL | ||
| * Header, with the fields enclosed by brackets [] replaced by your own identifying | ||
| * information: "Portions copyright [year] [name of copyright owner]". | ||
| * | ||
| * Copyright 2025 Wren Security. All rights reserved. | ||
| */ | ||
| package org.forgerock.openam.slf4j; | ||
|
|
||
| import org.slf4j.ILoggerFactory; | ||
| import org.slf4j.IMarkerFactory; | ||
| import org.slf4j.helpers.BasicMarkerFactory; | ||
| import org.slf4j.helpers.NOPMDCAdapter; | ||
| import org.slf4j.spi.MDCAdapter; | ||
| import org.slf4j.spi.SLF4JServiceProvider; | ||
|
|
||
| /** | ||
| * SLF4J service provider implementation which registers {@link AMLoggerFactory} as the logger factory. | ||
| */ | ||
| public class AMSlf4jServiceProvider implements SLF4JServiceProvider { | ||
|
|
||
| /** | ||
| * Version of the SLF4J API this implementation is compiled against. | ||
| */ | ||
| public static String REQUESTED_API_VERSION = "2.0.17"; | ||
|
|
||
| private final IMarkerFactory markerFactory = new BasicMarkerFactory(); | ||
|
|
||
| private final MDCAdapter mdcAdapter = new NOPMDCAdapter(); | ||
|
|
||
| private ILoggerFactory loggerFactory; | ||
|
|
||
| @Override | ||
| public ILoggerFactory getLoggerFactory() { | ||
| return loggerFactory; | ||
| } | ||
|
|
||
| @Override | ||
| public IMarkerFactory getMarkerFactory() { | ||
| return markerFactory; | ||
| } | ||
|
|
||
| @Override | ||
| public MDCAdapter getMDCAdapter() { | ||
| return mdcAdapter; | ||
| } | ||
|
|
||
| @Override | ||
| public String getRequestedApiVersion() { | ||
| return REQUESTED_API_VERSION; | ||
| } | ||
|
|
||
| @Override | ||
| public void initialize() { | ||
| loggerFactory = new AMLoggerFactory(); | ||
| } | ||
| } |
48 changes: 0 additions & 48 deletions
48
openam-slf4j/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
openam-slf4j/src/main/resources/META-INF/services/org.slf4j.spi.SLF4JServiceProvider
This file contains hidden or 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 @@ | ||
| org.forgerock.openam.slf4j.AMSlf4jServiceProvider |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.