Skip to content
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

Added a System.Logger Notifier implementation and deprecated the Slf4 notifier #2616

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomakehurst
Copy link
Member

This attempts to address #2557 and more general concerns about slf4j versions and shading.

By removing WireMock's direct dependency on slf4j this frees the user to make their own arrangements and use org:slf4j:slf4j-jdk-platform-logging with their own library versions if needed.

…j notifier. Also removed Slf4j from the runtime dependencies.
@tomakehurst tomakehurst requested a review from a team as a code owner February 21, 2024 10:05
@tomakehurst tomakehurst mentioned this pull request Feb 22, 2024

@Override
public void info(String message) {
if (verbose) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not:

if (logger.isLoggable(Level.INFO)) {
    // ...	
}

Let the user configure the logging system however they want it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there was a lot of processing to happen inside the if block it'd be worth it, but since we just log the parameter value we're given there's no performance gain to be had really.

Having said that if (verbose) is basically redundant since that parameter is only used in standalone mode which defaults to the console notifier, so I'll remove that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants