IBM Support

Write TM1 Server Debug Logging to an Alternate File

Troubleshooting


Problem

It is possible to write TM1 Server logging to a file other than tm1server.log.  Debug logging options can be configured by modifying the tm1s-log.properties file.  The tm1s-log.properties file should exist in the same directory as the TM1 Servers tm1s.cfg file.  If the tm1s-log.properties file is not present, default logging options are applied.  A restart of the TM1 Server is required after modifying the tm1s-log.properties file.  Debug options in the tm1s-log.properties file should be carefully considered.  Some debug options may impact performance or generate very large log file.

Resolving The Problem

Create or update the tm1s-log.properties file to contain the following content.

log4j.logger.TM1=INFO, S1
log4j.appender.S1=org.apache.log4j.SharedMemoryAppender
log4j.appender.S1.MemorySize=5 MB
log4j.appender.S1.MaxFileSize=100 MB
log4j.appender.S1.MaxBackupIndex=20
log4j.appender.S1.TimeZone=LOCAL

log4j.logger.TM1.Login=DEBUG, LOCK
log4j.additivity.TM1.Login=false

log4j.logger.TM1.Lock.Exception=DEBUG, LOCK
log4j.additivity.TM1.Lock.Exception=false

log4j.appender.LOCK=org.apache.log4j.SharedMemoryAppender
log4j.appender.LOCK.File=lock.log
log4j.appender.LOCK.MaxFileSize=100 MB
log4j.appender.LOCK.MaxBackupIndex=20
log4j.appender.LOCK.TimeZone=Local

The login and lock exception debug logging will be written to a file named lock.log. This log file will be created in the same directory as the tm1server.log file. The login and lock exception debug options from the above example are not know to cause TM1 Server performance issues and are not very verbose.

It's possible to split the debug logging options into separate log files by configuring the tm1s-log.properties file as follows.  This example shows how lock exception debug logging can be written to a lock.log file, and the REST API debug logging can be written to a restapi.log file.

log4j.logger.TM1.Login=DEBUG, LOCK
log4j.additivity.TM1.Login=false

log4j.logger.TM1.Lock.Exception=DEBUG, LOCK
log4j.additivity.TM1.Lock.Exception=false

log4j.appender.LOCK=org.apache.log4j.SharedMemoryAppender
log4j.appender.LOCK.File=lock.log
log4j.appender.LOCK.MaxFileSize=100 MB
log4j.appender.LOCK.MaxBackupIndex=20
log4j.appender.LOCK.TimeZone=Local

log4j.logger.TM1.HttpRequest=DEBUG, REST
log4j.additivity.TM1.HttpRequest=false

log4j.logger.TM1.HttpRequestBody=DEBUG, REST
log4j.additivity.TM1.HttpRequestBody=false

log4j.logger.TM1.HttpResponse=DEBUG, REST
log4j.additivity.TM1.HttpResponse=false

log4j.logger.TM1.HttpResponseBody=DEBUG, REST
log4j.additivity.TM1.HttpResponseBody=false

log4j.appender.REST=org.apache.log4j.SharedMemoryAppender
log4j.appender.REST.File=restapi.log
log4j.appender.REST.MaxFileSize=100 MB
log4j.appender.REST.MaxBackupIndex=20
log4j.appender.REST.TimeZone=Local

In this example separate lock.log and restapi.log files will be created. Login and lock debug logging will be written to only the lock.log file, and the REST API debug logging to only the restapi.log file.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD29G","label":"IBM Planning Analytics"},"Component":"","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
20 August 2021

UID

swg22003062