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

LogbackMetrics stop to count logback events after LoggerContext reset #2028

Closed
bendiscz opened this issue Apr 25, 2020 · 0 comments · Fixed by #2029
Closed

LogbackMetrics stop to count logback events after LoggerContext reset #2028

bendiscz opened this issue Apr 25, 2020 · 0 comments · Fixed by #2029
Labels
bug A general bug
Milestone

Comments

@bendiscz
Copy link
Contributor

Hi!

I use logback configuration with scan="true" that reconfigures logback whenever logback.xml changes. However, the first reload causes that no more logback events are recorded by the micrometer LogbackMetrics.

The reason this happens is that logback LoggerContext is reset when the configuration is reloaded and the reset clears the turbo filter list. Registering a LoggerContextListener that re-adds the MetricsTurboFilter solves this issue.

I'm going to attach a patch to LogbackMetrics that fixes this.

Thanks,
M.B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug
Projects
None yet
2 participants