JBoss.orgCommunity Documentation

Chapter 4. Command Logging

4.1. Command Logging API

Commaand logger lets the user capture the commands that are being executed in the Teiid System at the user level as well the at the data source level. The user commands are commands that have been submitted to the system and data source commands are those that are being executed by the connectors

Users have the ability to capture command logging information in a log file, saved to a user-specified location. If a custom command logger is in use, command logging information will no longer be logged to the repository tables. Users and administrators must choose between the default logging to the Teiid Repository and custom command logging.

Command Logging is defined by interface com.metamatrix.dqp.spi.CommandLoggerSPI administrators and users can write their own Java implementation of this interface and plug it into Teiid by supplying the fully-qualified classname as the value of the metamatrix.server.commandLoggerClassname system property.

Users must also add the implementation class file to the classpath of the Teiid System. This can be done by creating a jar file, adding it to the /lib/patches directory section, and doing a full stop and restart of the server.

A user’s CommandLogger implementation may require its own property names and values. Add these name/value pairs as a semicolon-delimited list after the command logger classname property in the Teiid Console. For example, a user might need to place a value such as this into the Console system property:


The first part of this string tells Teiid what class it needs to load and instantiate. The other two parts of the string (delimited by semicolons), are a couple of name/value pairs that will be passed to the newly-instantiated Command Logger.

The system properties "metamatrix.transaction.log.storeMMCMD" and "metamatrix.transaction.log.storeSRCCMD" control whether to send the custom logger user level command and source level commands respectively.