tm1top log

Product:
Planning Analytics 2.0.7
Microsoft Windows 2016 server

Problem:
How to make the log files not so big for TM1?
Can i have tm1top data logged to a file?

Solution:

Create the tm1s-log.properties file in the same folder as your tm1s.cfg file.
log4j.appender.S1.MaxFileSize=10 MB tells how big your tm1server.log file will be, default is much larger.
log4j.appender.S1.MaxBackupIndex=40 is the number of files that will be kept. Increase this to the value you need.

To enable TM1TOP data, without using the tm1top utility, add to your tm1s.cfg file
TopLogging=T
Then active and set the filename with this parameters in tm1s-log.properties file:

log4j.logger.Top=INFO, S_Top
log4j.appender.S_Top=org.apache.log4j.SharedMemoryAppender
log4j.appender.S_Top.MemorySize=5 MB

log4j.appender.S_Top.File=tm1top.log

log4j.appender.S_Top.Format=TM1Top

Then in the tm1s-log.properties file you adjust the size with the parameters:

log4j.appender.S_Top.MaxFileSize=10 MB
log4j.appender.S_Top.MaxBackupIndex=20

This is a great example of a tm1s-log.properties file that is copied from https://www.ykud.com/blog/cognos/tm1-cognos/tm1s-log-properties/

# main logging file
log4j.logger.TM1=INFO, S1
# it's good to have Locks details -- provides the names of the locked objects
log4j.logger.TM1.Lock.Exception=DEBUG, S1
# S1 is set to be a SharedMemoryAppender
log4j.appender.S1=org.apache.log4j.SharedMemoryAppender
# Specify the size of the shared memory segment
log4j.appender.S1.MemorySize=5 MB
# Specify the max filesize
log4j.appender.S1.MaxFileSize=10 MB
# Specify the max backup index
log4j.appender.S1.MaxBackupIndex=20
# Specify GMT or Local timezone
log4j.appender.S1.TimeZone=Local

# event logging configuration
# Meeds EventLogging=T in the tm1s.cfg
# https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_inst.2.0.0.doc/c_eventlogging.html
log4j.logger.Event=INFO, S_Event
log4j.appender.S_Event=org.apache.log4j.SharedMemoryAppender
log4j.appender.S_Event.MemorySize=1 MB
log4j.appender.S_Event.MaxFileSize=10 MB
log4j.appender.S_Event.MaxBackupIndex=10
log4j.appender.S_Event.File=tm1event.log
log4j.appender.S_Event.Format=TM1Event
log4j.appender.S_Event.TimeZone=Local

# tm1top logging configuration
# Set up TopLogging=T in the tm1s.cfg
# https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_op.2.0.0.doc/c_pa_top_logger.html
log4j.logger.Top=INFO, S_Top
log4j.appender.S_Top=org.apache.log4j.SharedMemoryAppender
log4j.appender.S_Top.MemorySize=5 MB
log4j.appender.S_Top.MaxFileSize=10 MB
log4j.appender.S_Top.MaxBackupIndex=20
log4j.appender.S_Top.File=tm1top.log
log4j.appender.S_Top.Format=TM1Top

# Logins file -- records every time a user logins, can be used for license evaluation or just checking user activity
log4j.logger.TM1.Login=DEBUG, S_Login
log4j.appender.S_Login=org.apache.log4j.SharedMemoryAppender
log4j.appender.S_Login.MemorySize=5 MB
log4j.appender.S_Login.MaxFileSize=10 MB
log4j.appender.S_Login.MaxBackupIndex=20
log4j.appender.S_Login.File=tm1login.log
log4j.appender.S_Login.TimeZone=Local
log4j.additivity.TM1.Login=false

More Information:
https://www.ykud.com/blog/cognos/tm1-cognos/tm1s-log-properties/

https://www.ibm.com/support/knowledgecenter/SSD29G_2.0.0/com.ibm.swg.ba.cognos.tm1_op.2.0.0.doc/c_pa_top_logger.html 

https://www.ykud.com/posts/

https://www.wimgielis.com/tm1_articles_EN.htm

https://www.ibm.com/support/pages/write-tm1-server-debug-logging-alternate-file