JBoss.orgCommunity Documentation

Chapter 4. Logging

4.1. General Logging
4.1.1. Logging Contexts
4.2. Command Logging
4.3. Audit Logging

The Teiid system provides a wealth of information via logging. To control logging level, contexts, and log locations, you should be familiar with log4j and the container's jboss-log4j.xml configuration file. Teiid also provides a <profile>/conf/jboss-teiid-log4j.xml containing much of information from chapter.

All the logs produced by Teiid are prefixed by "org.teiid". This makes it extremely easy to control of of Teiid logging from a single context. Note however that changes to the log configuration file require a restart to take affect

While all of Teiid's logs are prefixed with "org.teiid", there are more specific contexts depending on the functional area of the system. Note that logs originating from third-party code, including integrated org.jboss components, will be logged through their respective contexts and not through org.teiid. See the table below for information on contexts relevant to Teiid. See the container's jboss-log4j.xml for a more complete listing of logging contexts used in the container.

Context

Description

com.arjuna

Third-party transaction manager. This will include information about all transactions, not just those for Teiid.

org.teiid

Root context for all Teiid logs. Note: there are potentially other contexts used under org.teiid than are shown in this table.

org.teiid.PROCESSOR

Query processing logs. See also org.teiid.PLANNER for query planning logs.

org.teiid.PLANNER

Query planning logs.

org.teiid.SECURITY

Session/Authentication events - see also AUDIT logging

org.teiid.TRANSPORT

Events related to the socket transport.

org.teiid.RUNTIME

Events related to work management and system start/stop.

org.teiid.CONNECTOR

Connector logs.

org.teiid.BUFFER_MGR

Buffer and storage management logs.

org.teiid.TXN_LOG

Detail log of all transaction operations.

org.teiid.COMMAND_LOG

See command logging

org.teiid.AUDIT_LOG

See audit logging

org.teiid.ADMIN_API

Admin API logs.

Command logging captures executing commands in the Teiid System. Both user commands (that have been submitted to Teiid) and data source commands (that are being executed by the connectors) are tracked through command logging.

To enable command logging to the default log location, simply enable the DETAIL level of logging for the org.teiid.COMMAND_LOG context.

To enable command logging to an alternative file location, configure a separate file appender for the DETAIL logging of the org.teiid.COMMAND_LOG context. An example of this is shown below and can also be found in the jboss-log4j.xml distributed with Teiid.

<appender name="COMMAND" class="org.apache.log4j.RollingFileAppender">
      <param name="File" value="log/command.log"/>
     <param name="MaxFileSize" value="1000KB"/>
     <param name="MaxBackupIndex" value="25"/>
      <layout class="org.apache.log4j.PatternLayout">
         <param name="ConversionPattern" value="%d %p [%t] %c - %m%n"/>
      </layout>
   </appender>   
    
   <category name="org.teiid.COMMAND_LOG">
      <priority value="INFO"/>
      <appender-ref ref="COMMAND"/>
   </category>

See the Developer's Guide to develop a custom logging solution if file based, or any other built-in Log4j, logging is not sufficient.

Audit logging captures important security events. This includes the enforcement of permissions, authentication success/failures, etc.

To enable audit logging to the default log location, simply enable the DETAIL level of logging for the org.teiid.AUDIT_LOG context.

To enable audit logging to an alternative file location, configure a separate file appender for the DETAIL logging of the org.teiid.AUDIT_LOG context. An example of this is already in the log4j.xml distributed with Teiid. See the Developer's Guide to develop a custom logging solution if file based, or any other built-in Log4j, logging is not sufficient.