How do I reduce the log level of Candlepin?
We get gigas of log entries to /var/log/candlepin/candlepin.log, mostly just stuff like:
2017-04-03 10:05:22,332 [thread=http-bio-8443-exec-4] [req=243254b6-9d7e-487b-a51e-34253384fe86, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/e4cd05e3-39ae-4ea1-a2e8-4f29604a07f2/compliance
2017-04-03 10:05:22,379 [thread=http-bio-8443-exec-7] [req=f0bd5fca-f22d-468b-9ba3-712461d2fd22, org=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/consumers/2b316c03-6733-4527-acfe-f13c48507bcc/guests
...etc...etc...
The info at Red Hat Satellite 6: key log files and how to enable debug logging (Foreman, Katello, Puppet, Pulp, Candlepin, Hammer, etc.) tells us we can change to log4j.logger.org.candlepin=DEBUG to get more logging, and also says we can add this if the logging is excessive:
log4j.logger.org.candlepin.resource.ConsumerResource=WARN
log4j.logger.org.candlepin.resource.HypervisorResource=WARN
I have done so and restarted Tomcat (actually restarted all using katello-service), but still get the INFO lines like above.
I assume we can change to log4j.logger.org.candlepin=WARN to reduce the log size. However, if I only want to get rid of the INFO messages above and keep other INFO messages. What do I do? I thought the... ConsumerResource=WARN above should do the trick, but I don't understand the common logging filter thing.
Responses
Tried log4j.logger.org.candlepin=INFO?
DEBUG level increases logging which is ideal for troubleshooting. Ideally, it should not be on permanently. More on log4j levels
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
