cryostatio / cryostat-agent

Java Agent implementing Cryostat Discovery and JFR data pushing
https://cryostat.io/
Other
3 stars 8 forks source link

Default log level to minimize application log noise #530

Open andrewazores opened 3 weeks ago

andrewazores commented 3 weeks ago

See also https://github.com/cryostatio/cryostat-agent/issues/369

The Agent's default log level should probably be ERROR or maybe WARN, suppressing INFO/DEBUG/TRACE log messages. Those are useful for Agent development and debugging, but it's undesirable for the actual application deployment's logs to contain Agent messages unless there is something wrong with the Agent or its configuration, or its Cryostat server.

andrewazores commented 3 weeks ago

https://github.com/cryostatio/cryostat-agent/blob/main/src/main/resources/simplelogger.properties

the log level can be specified with this property:

-Dio.cryostat.agent.shaded.org.slf4j.simpleLogger.defaultLogLevel

as seen here:

https://github.com/cryostatio/cryostat/blob/7976163e02825567da60b8bf84dd823dd9486d56/compose/sample_apps/quarkus-cryostat-agent.yml#L15