How to Configure Logging for the Java Processes
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 rctomcat6 restart, rctaskomatic restart or rcrhn-search restart respectively in order to see the effect of the changes.
The main logfile of the SUSE Manager web application is this one (stdout of the tomcat process):
Logging for the web application is configured in this file:
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:
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
The taskomatic logfile can be found here:
Logging for the taskomatic process is configured in this file:
In order to enable general DEBUG logging (very noisy!), just uncomment the last line in there:
The logfile for the search server (rhnsearchd) is to be found here:
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!):
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: