18.4 Types of Log Files

This section discusses the different log files that are generated and what each file contains.

18.4.1 Catalina Log

The Catalina log is the global log. It records information about events such as the startup and shutdown of the Tomcat application server, the deployment of new applications, or the failure of one or more subsystems. The messages include information about the time and date of the event and the ID of the user who initiated the event. The catalina.log file contains all log messages that are written to the Tomcat system.out and system.err streams. Tomcat internal log statements use the java.util.logging package (juli). The default destination for that log is standard.out.The catalina.out file can include: Uncaught exceptions printed by java.lang.ThreadGroup.uncaughtException(..)Thread dumps, if you requested them through a system signalThe catalina.out file is located on the Tomcat server instance. Each server instance has its own catalina.out file. By default, the catalina.out file is located in the logs directory under the Tomcat root directory. For example, /opt/netiq/idm/apps/tomcat/logs/catalina.out.

It is recommended that you do not modify the log files manually. Modifying a file could result in the file no longer recording information from the Tomcat server.By default, a server instance prints only messages of the Info severity level or higher to standard. out. You can modify the severity threshold as a logging configuration so that the server prints more or fewer messages to respective log files. For more information, see Understanding Logging Configuration.

18.4.2 Localhost Log

The Localhost log (localhost_access_log.<date of log generation>.txt) contains HTTP transactions between the client and the application server. The default location and rotation policy for this log is the same as catalina.out file.

18.4.3 Application Log

Each application component provides its own logging. Tomcat provides no support for application logs. Each component includes its own logging configuration that defines default log levels and appender configurations. These logging configuration files are placed in the \conf directory of the Tomcat server.

18.4.4 Additional Log Files

The catalina.out log messages and log files communicate events and conditions that affect Tomcat server operations. Logs for all application components are logged in the catalina.out file. This file also records the interactions between the Tomcat server and the client.

Some subsystems and components also maintain additional log files that help in auditing their individual interactions. The following list describes some of the additional configuration files:

  • Logging is turned off by default and must be enabled in the setenv.sh file in the /TOMCAT_INSTALLED_HOME/bin/ directory.

  • The HTTP subsystem keeps a log of all HTTP transactions between the client and the application server in the, localhost_access_log.<date of log generation>.txt file. The default location and rotation policy for this log is the same as the catalina.out file. You can set the attributes that define the behavior of HTTP access logs for your server.

  • Each server has a transaction log that stores information about committed transactions coordinated by the server that may not have been completed. Tomcat uses the transaction log when recovering from a system crash or a network failure. You cannot directly view the transaction log because the file is in a binary format.

  • The auditing service records information from a number of security requests, which are determined internally by the security framework. The service also records the event data associated with these security requests and the outcome of the requests. Each server writes auditing data to its own log file in the server directory.

  • The JDBC subsystem records various events related to JDBC connections, including registering JDBC drivers and SQL exceptions. The events related to JDBC are written to the server log, such as when connections are created or refreshed or when configuration changes are made to the JDBC objects.

  • The Java Message Service (JMS) logging is enabled by default when you create a JMS server with Apache ActiveMQ as a JMS provider. Logs can be found in the ActiveMQ installed path at data/activemq.log. The JMS persistent store helps to persist email messages. If JMS is not properly configured, any email message in the memory queue will be lost if the application server is shut down.

  • The hibernate framework writes log messages in different categories and log levels. For example, it logs messages for establishing connections with the database, executed SQL statements, or cache interactions. Hibernate logging is enabled by default at the Info level. The events related to JDBC subsystem are written to the server log. All hibernate related information is logged when the data is persisted in the application.