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

Issue #4830 - Enabling JMX on jetty-slf4j-impl #4839

Merged
merged 10 commits into from
May 19, 2020

Conversation

sbordet
Copy link
Contributor

@sbordet sbordet commented May 3, 2020

@joakime can you please review and compare this alternative implementation?

joakime and others added 4 commits April 30, 2020 14:51
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Alternative implementation that adds JMX support for jetty-slf4j-impl.

This version modifies MBeanContainer to be aware of @mxbean annotations and *MBean and *MXBean interfaces, so it does not require a dependency on jetty-jmx nor on java.management.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

I think this has elements that are better, and elements that need better testing.

@@ -526,7 +526,7 @@ public void testToString()
assertThat("Logger.toString", log.toString(), is("JettyLogger:xxx:LEVEL=ERROR"));

log.setLevel(JettyLogger.OFF);
assertThat("Logger.toString", log.toString(), is("JettyLogger:xxx:LEVEL=OFF"));
assertThat("Logger.toString", log.toString(), is("JettyLogger:xxx:LEVEL=ERROR"));
Copy link
Contributor

Choose a reason for hiding this comment

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

What?
OFF != ERROR

Copy link
Contributor Author

@sbordet sbordet May 3, 2020

Choose a reason for hiding this comment

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

In #4831, "OFF" is converted to 999 and 999 is converted to Level.ERROR. So, uhm, why don't we get rid of OFF and just call it ERROR so it conforms to SLF4J?

Updates after review.
Fixed test failures.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
@sbordet sbordet requested a review from joakime May 3, 2020 19:40
@joakime joakime changed the title Jetty 10.0.x 4830 jetty slf4j impl with jmx 2 Issue #4830 - Enabling JMX on jetty-slf4j-impl May 7, 2020
@joakime
Copy link
Contributor

joakime commented May 7, 2020

@sbordet mind if I add a few more unit tests to this branch?

joakime and others added 5 commits May 8, 2020 12:34
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
…l names

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Updates after review.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Updates after review, take 2.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Copy link
Contributor

@joakime joakime left a comment

Choose a reason for hiding this comment

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

LGTM

@gregw
Copy link
Contributor

gregw commented May 17, 2020

@sbordet any reason this has not been merged?

@sbordet sbordet merged commit beda43c into jetty-10.0.x May 19, 2020
@sbordet sbordet deleted the jetty-10.0.x-4830-jetty-slf4j-impl-with-jmx-2 branch May 19, 2020 07:38
@sbordet sbordet linked an issue May 19, 2020 that may be closed by this pull request
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.

Add JMX to new Jetty 10 jetty-slf4j-impl
3 participants