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

JMX Gatherer does not seem to respect logging config #1266

Open
akats7 opened this issue Apr 11, 2024 · 6 comments
Open

JMX Gatherer does not seem to respect logging config #1266

akats7 opened this issue Apr 11, 2024 · 6 comments

Comments

@akats7
Copy link
Contributor

akats7 commented Apr 11, 2024

Component(s)

jmx-metrics

What happened?

Description

Hi all, I'm not able to reduce the log level using the slf4j log level config, I see the jmxreceiver exposing it as a config param which maps to setting org.slf4j.simpleLogger.defaultLogLevel on the gatherer process. But when I try to pass it as a system prop it doesn't seem to have an effect. I admittedly haven't really done a code dive on this yet but wanted to reach see if others have noticed this or if I'm missing something.

Steps to Reproduce

Set -Dorg.slf4j.simpleLogger.defaultLogLevel="error" for example

Component version

1.32

Log output

No response

Additional context

No response

@akats7
Copy link
Contributor Author

akats7 commented Apr 17, 2024

Hey all, just wanted to follow up. Has anyone experienced this issue

@dehaansa @breedx-splk @rmfitzpatrick

@breedx-splk
Copy link
Contributor

Hey @akats7 , I haven't seen this, but I also don't use it. 😁 It's weird, because even though slf is listed as an implementation dependency, the code itself only uses java.util.logging for its logging. I'd guess that's why it's not having any effect.

@dehaansa
Copy link
Contributor

This is strange, I recall having worked on this logging configuration from the jmxreceiver, but I have nothing concrete to draw upon. From all I can see it certainly seems to not affect the metrics gatherer in any way.

@akats7
Copy link
Contributor Author

akats7 commented May 29, 2024

Hey @breedx-splk @dehaansa, so I was able to get the logging configuration updated by adding a logging properties file with util.logging config options. Question is do we want to update the gatherer to use l4j or update the documentation to reflect the way to configure the logging.

@breedx-splk
Copy link
Contributor

Hey @breedx-splk @dehaansa, so I was able to get the logging configuration updated by adding a logging properties file with util.logging config options. Question is do we want to update the gatherer to use l4j or update the documentation to reflect the way to configure the logging.

Thanks for looking into it.

I don't think we should take on another dependency, in the form of log4j or any other logging framework if we can avoid it. Updating docs and/or providing examples on how to control the logging verbosity seems like the way to go to me. My $0.02.

@akats7
Copy link
Contributor Author

akats7 commented Jun 3, 2024

Gotcha, I can open a PR, will do the same for the JMX receiver

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

No branches or pull requests

6 participants