Skip to main content
Waters

How to enable debug logging for Apache Tomcat in NuGenesis SDMS - WKB75160

Article number: 75160

OBJECTIVE or GOAL

Obtain detailed log files from Apache Tomcat.

ENVIRONMENT

  • NuGenesis 8 SDMS
  • NuGenesis 9 SDMS

PROCEDURE

  1. Logging properties are defined in a configuration file:
    • NuGenesis 8: Drive:\Program Files (x86)\apache-tomcat-6.0.29\conf\logging.properties
    • NuGenesis 9: Drive:\Program Files (x86)\Waters\apache-tomcat-9.0.8\conf\logging.properties
  2. Look for this line in the log file:
    • org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
  3. Set the log level to ALL to enable debug logging.
  4. Save and close the file.
  5. Restart the Apache Tomcat service.
  6. Log files will be written to:
    • NuGenesis 8: Drive:\Program Files (x86)\apache-tomcat-6.0.29\logs\localhost.<DATE>.log
    • NuGenesis 9: Drive:\Program Files (x86)\Waters\apache-tomcat-9.0.8\logs\localhost.<DATE>.log

ADDITIONAL INFORMATION

The Log levels are, in order from less information to more information: SEVERE, WARNING, CONFIG, FINE, FINER, FINEST, ALL

Apache Tomcat also has an access log file. This log—disabled by default in NuGenesis installations—provides information similar to the WWW access log in Microsoft IIS, but from the perspective of Tomcat. To enable the access log:

  • Edit the server.xml file in the NuGenesis Tomcat installation:
    • NuGenesis 8: Drive:\Program Files (x86)\apache-tomcat-6.0.29\conf\server.xml
    • NuGenesis 9: Drive:\Program Files (x86)\Waters\apache-tomcat-9.0.8\conf\server.xml
  • Add the following line to the file above the first "<Context ..." line:
    • <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="%t %a %S %H %m %U %q %s" resolveHosts="false"/>
  • Save and close the file.
  • Restart the Apache Tomcat service.
  • The access log will be written to the \logs folder in the NuGenesis Tomcat installation path.

id75160, SDMS, SDMS8, SDMS8NU, SUPISDMS, SUPNG

Not able to find a solution? Click here to request help.