SUSE Manager/JavaLogging
Contents
How to Configure Logging for the Java Processes
Introduction
Using log4j it is generally possible to set log levels for certain Java packages and specific classes separately. In order to do that, add a line as above per package or class, but specify the exact package or class with the same syntax as well as the desired log level. This is valid for all log4j config files we talk about here.
Further note that whenever the logging configuration is changed for one of the components, that specific component needs to be restarted using rctomcat restart, rctaskomatic restart or rcrhn-search restart respectively in order to see the effect of the changes.
Tomcat
The main logfile of the SUSE Manager web application is this one (stdout of the tomcat process):
/var/log/rhn/rhn_web_ui.log
Logging for the web application is configured in this file:
/srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties
Note that possibly this file doesn't exist on your server, in this case please copy the config file from git. In order to enable general DEBUG logging (very noisy!), just uncomment the last line in there:
log4j.logger.com.redhat.rhn=DEBUG
This would set the DEBUG log level for all the com.redhat.rhn Java package, specify any subpackage or Java class here in order to adapt the logging to your needs. The following lines for instance would enable logging for all the content sync related code, setup wizard and HTTP code respectively:
log4j.logger.com.redhat.rhn.manager.content=DEBUG log4j.logger.com.redhat.rhn.manager.setup=DEBUG log4j.logger.com.redhat.rhn.common.util.http=DEBUG
Taskomatic
The taskomatic logfile can be found here:
/var/log/rhn/rhn_taskomatic_daemon.log
Logging for the taskomatic process is configured in this file:
/usr/share/rhn/classes/log4j.properties
In order to enable general DEBUG logging (very noisy!), just uncomment the last line in there:
log4j.logger.com.redhat.rhn=DEBUG
Rotation settings can be changed editing the following file:
/usr/share/rhn/config-defaults/rhn_taskomatic_daemon.conf
Search Server
The logfile for the search server (rhnsearchd) is to be found here:
/var/log/rhn/search/rhn_search.log
Note that all logging of the search server is also forwarded to rhn_search_daemon.log inside the same folder. Logging for the search server is configured by placing a configuration file at this URI (file and folder do not exist initially!):
/usr/share/rhn/search/classes/log4j.properties
The search server log4j config file from git should be used as a starting point and can be further customized. In order to enable general DEBUG logging, please add this line in there:
log4j.logger.com.redhat.satellite=DEBUG,SearchAppender