This page explains GUMS logging.
All information in GUMS is logged through the apache commons logging package. The implementation used in GUMS is apache log4j. To change the logging implementation you have to refer to the commons.logging implementation. Be aware that some library that GUMS uses may not be as well behaved in regard to logging.
The configuration is controlled by the log4j.properies file. This is a normal log4j configuration file: refer to the log4j manual for more information.
GUMS using the follow conventions for log names:
This log is meant for whoever is maintaining GUMS installation at a particular site. The log is designed to be used in different ways: on standard error, in a log file and in e-mails. E-mails will get from WARN up, the standard error will receive from INFO up and the log can go down to TRACE. The breakdown on the logging level is:
The developer log is meant for someone developing the code or fixing bugs. Each class will use the log named as their full class name. The breakdown on the logging level is:
The site security log will log all accesses.
GUMS has the capability to notify an administrator via email of any errors that may occur. The .../WEB-INF/classes/log4j.properties contains these entries but are commented out. Look for these lines:
<pre class="programlisting"> #log4j.appender.mail=org.apache.log4j.net.SMTPAppender #log4j.appender.mail.from=gums@site.com #log4j.appender.mail.subject=gums e-mail alert #log4j.appender.mail.SMTPHost=smtp.site.com #log4j.appender.mail.to=admin@site.com #log4j.appender.mail.layout=org.apache.log4j.PatternLayout #log4j.appender.mail.layout.ConversionPattern=%%d{DATE} [%%-5p]: %%m%%n </pre>
Uncomment them and set the "from", "SMTPHost", and "to" lines to the right values for your site. "From" should be the username under which GUMS runs. Here is a sample:
<pre class="programlisting"> log4j.appender.mail=org.apache.log4j.net.SMTPAppender log4j.appender.mail.from=daemon@cd-94372.dhcp.fnal.gov log4j.appender.mail.subject=gums e-mail alert log4j.appender.mail.SMTPHost=smtp.fnal.gov log4j.appender.mail.to=aheavey@fnal.gov log4j.appender.mail.layout=org.apache.log4j.PatternLayout log4j.appender.mail.layout.ConversionPattern=%%d{DATE} [%%-5p]: %%m%%n </pre>
Towards the top of the same file (line 22) under the heading "Log for GUMS administrator", you'll see:
<pre class="programlisting"> log4j.logger.gums.resourceAdmin=DEBUG, adminFile #log4j.logger.gums.resourceAdmin=DEBUG, mail, adminFile </pre>
Comment out the first line and uncomment the second so that the resource info that you need to get comes to you via email in addition to going to a file. If tomcat is already running, you will need to restart it to effect the change.