19.3. Enabling Debug Logging

This section describes how to enable debug logging to provide detailed debugging information for the major components of Satellite 6. Debug logging provides the most detailed log information and can help with troubleshooting issues that may arise with Satellite 6 and its components. Other logging levels include WARN, INFO, and Error. Different components provide varying levels of logging.
Foreman and Katello

To enable debug logging for these components, modify the /usr/share/foreman/config/environments/production.rb file to ensure the following line exists:

config.log_level = :debug
Restart the required services:
# service foreman restart
# service foreman-tasks restart
You should now see more verbose messages in the /var/log/foreman/production.log file.
Puppet

See https://docs.puppetlabs.com/references/latest/configuration.html#loglevel for information on how to enable debug logging for Puppet. The Puppet log files are saved to the /var/log/puppet/logs directory.

Pulp

See https://pulp.readthedocs.org/en/latest/user-guide/troubleshooting.html for initial information on how to enable logging for Pulp.

Procedure 19.1. To Ensure Successful Debug Logging for Pulp:

  1. Ensure that rsyslog allows debug log files to be written to /var/log/messages, or redirect the log files to another directory.
  2. In the /etc/pulp/server.conf file, change the following line:
    # log_level: INFO
    
    to:
    
    log_level: DEBUG
  3. Restart the required services:
    # for i in pulp_resource_manager pulp_workers pulp_celerybeat; do service $i restart; done

Note

If you set the Pulp logging level to Debug and you are using rsyslog, you might encounter a situation where many log entries are discarded and missed. If this occurs, create a new log configuration file as follows:
# vi /etc/rsyslog.d/pulp.conf
:programname, startswith, "pulp" -/var/log/pulp.log
 & ~
Save the file and then restart the required services:
# service rsyslog restart
# for i in pulp_resource_manager pulp_workers pulp_celerybeat; do service $i restart; done
Inspect the contents of the /var/log/pulp.log file for debug output.
Candlepin

To enable debug logging for Candlepin, add the following line to the /etc/candlepin/candlepin.conf file:

log4j.logger.org.candlepin=DEBUG
Restart the required services: on Red Hat Enterprise Linux 6, the service is called tomcat6; on Red Hat Enterprise Linux 7, the service is called tomcat.
# service tomcat6 restart
You should now see more verbose messages in the /var/log/candlepin/candlepin.log file.
Capsule

To enable debug logging for Capsule, uncomment the DEBUG line in the /etc/foreman-proxy/settings.yml file:

# WARN, DEBUG, Error, Fatal, INFO, UNKNOWN
:log_level: DEBUG
Restart the foreman-proxy service:
# service foreman-proxy restart
The log files are saved to the /var/log/foreman-proxy/proxy.log file.
Hammer

To enable debug logging for hammer, comment out the log_level entry in the /etc/hammer/cli_config.yml file, as follows:

#   :log_level: 'error' `
The log files are saved to the ~/.foreman/log/hammer.log file. You can configure the log file directory in the cli_config.yml file.