Log files are the main information source for the administrator about the activities of the system and potential problems of the system. The administrator should have a look at the log files on a regular basis. There may be problems that do not appear on the user interface, but are reported in the log file.
The location of the log files and the logging behavior can be configured in the respective .xml files:
The following log files are used:
Config info: How to activate the access.log
In a default installation, the following lines in the configuration file, cm6.xml or cm6-cmrf.xml, are commented out. By commenting them in, you can start access logging in your ConSol CM system.
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtualserver="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socketbinding="http"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<!--<access-log pattern='%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i %S %T'>-->
<!--<directory path="./" relative-to="jboss.server.log.dir"/>-->
<!--</access-log>-->
</virtual-server>
</subsystem>
Config info: How to produce good output in operationtimes.log
In order to produce concise and informative output in this log file, the respective ConSol CM module has to be run in DEBUG mode. Please see configuration examples in the following code snippets.
JBoss 7 configuration:
<!-- JBoss7, add these parts to your cm6.xml or cm6-cmrf.xml file -->
<size-rotating-file-handler name="OPERATION_TIMES" autoflush="true">
<file relative-to="jboss.server.log.dir" path="operationtimes.log"/>
<append value="true"/>
<rotate-size value="300m"/>
<max-backup-index value="6"/>
<formatter>
<pattern-formatter pattern="%d %-5.5p [%30.-30c] [%X{username}-%X{sessionId}] %m%n"/>
</formatter>
</size-rotating-file-handler>
<logger category="com.consol.cmweb.client.webapp.timemeasure.log.Log4jOperationLogger">
<level name="DEBUG"/>
<handlers>
<handler name="OPERATION_TIMES"/>
</handlers>
</logger>
Oracle Weblogic Server configuration:
<!-- Oracle WLS -->
<appender name="OPERATION_TIMES" class=" org.apache.log4j.RollingFileAppender">
<errorHandler class=" org.apache.log4j.helpers.OnlyOnceErrorHandler"/>
<param name="File" value=" @DOMAIN_HOME/cm-logs/operationtimes.log"/>
<param name="Append" value="true"/> <param name="MaxFileSize" value="500MB"/>
<param name="MaxBackupIndex" value="6"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m\n"/>
</layout>
</appender>
<logger name="com.consol.cmweb.client.webapp.timemeasure.log.Log4jOperationLogger">
<level value="DEBUG"/> <appender-ref ref="OPERATION_TIMES"/>
</logger>
Two log files report information which are specific for the Admin Tool. The CM logging configuration might have to be adapted during a system update from a CM version lower than 6.11 to 6.11.
Config info #1: How to integrate audit.log into the CM configuration. Only required for updates from CM version older than 6.11 to 6.11.
Insert the following line into the configuration file cm6.xml or cm6-cmrf.xml at the correct locations. If you are not familiar with the logging configuration, ask your CM consultant for help!
<size-rotating-file-handler name="AUDIT" autoflush="true">
<file relative-to="jboss.server.log.dir" path="audit.log"/>
<append value="true"/>
<rotate-size value="300m"/>
<max-backup-index value="6"/>
<formatter>
<pattern-formatter pattern="%d %-5.5p [%30.-30c] [%X{username}-%X{context}-%X{sessionId}] %m%n"/>
</formatter>
</size-rotating-file-handler>
<logger category="com.consol.cmas.core.server.history.method.MethodExecutionJournalAspect" use-parent-handlers="false">
<level name="TRACE"/>
<handlers>
<handler name="AUDIT"/>
</handlers>
</logger>
Config info #2: How to integrate transfer.log into the CM configuration. Only required for updates from CM version older than 6.11 to 6.11.
Insert the following line into the configuration file cm6.xml or cm6-cmrf.xml at the correct locations. If you are not familiar with the logging configuration, ask your CM consultant for help!
<size-rotating-file-handler name="TRANSFER_FILE" autoflush="true">
<file relative-to="jboss.server.log.dir" path="transfer.log"/>
<append value="true"/>
<rotate-size value="300m"/>
<max-backup-index value="6"/>
<formatter>
<pattern-formatter pattern="%d %-5.5p [%X{username}-%X{context}-%X{sessionId}] %m%n"/>
</formatter>
</size-rotating-file-handler>
<logger category="TRANSFER" use-parent-handlers="false">
<level name="INFO"/>
<handlers>
<handler name="TRANSFER_FILE"/>
</handlers>
</logger>
In the default configuration, log file entries have the following syntax:
Date Timestamp Loglevel [Logger] Message
Example for a log file entry (successful start of ConSol CM in JBoss):
2012-11-06 14:22:12,685 INFO [e.coyote.http11.Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
The components of the message:
Simple messages, and those reporting a successful operation, often have only one line.
When errors are reported (log level ERROR), you might find stack traces in the logs. Please contact one of our ConSol CM consultants or our ConSol CM support team for help.