Page 1 of 1
LOGOUTPUT to separate log file
Posted: Thu Nov 21, 2019 4:14 pm
by tomok
I use the LOGOUTOPUT command in a number of my TI processes to write out things when users run processes so I have a history of who runs what and the parameters they supplied, as well as actions taken. Is it possible to have those messages written to a separate file (via settings in the tm1slog.properties file) so that my tm1server.log file doesn't get cluttered up with all these lines? Ideally, I would like to have a separate file called TI.log to hold all these so I have a history of all the TI processes in one file.
Re: LOGOUTPUT to separate log file
Posted: Thu Nov 21, 2019 5:48 pm
by gtonkin
There is a logger called TM1.TILogOutput but tried a quick config and test and still ended up writing to the server log. I could be doing something silly from my side so may be worthwhile doing your own testing.
Just linking to the post to
show available loggers for anyone needing them:
Re: LOGOUTPUT to separate log file
Posted: Thu Nov 21, 2019 7:10 pm
by Andrew_M
Hi Tomok,
Try to play with the below code adding it to tm1-log.properties file:
Code: Select all
log4j.logger.TM1.TILogOutput=DEBUG, Debug_LogOutput
log4j.appender.Debug_LogOutput=org.apache.log4j.SharedMemoryAppender
log4j.additivity.TM1.TILogOutput=false
log4j.appender.Debug_LogOutput.File=TI.log
log4j.appender.Debug_LogOutput.MaxFileSize=100 MB
Re: LOGOUTPUT to separate log file
Posted: Thu Nov 21, 2019 7:43 pm
by tomok
Andrew_M wrote: ↑Thu Nov 21, 2019 7:10 pm
Hi Tomok,
Try to play with the below code adding it to tm1-log.properties file:
Code: Select all
log4j.logger.TM1.TILogOutput=DEBUG, Debug_LogOutput
log4j.appender.Debug_LogOutput=org.apache.log4j.SharedMemoryAppender
log4j.additivity.TM1.TILogOutput=false
log4j.appender.Debug_LogOutput.File=TI.log
log4j.appender.Debug_LogOutput.MaxFileSize=100 MB
That worked perfectly. Thanks.
Re: LOGOUTPUT to separate log file
Posted: Thu Nov 21, 2019 8:30 pm
by Wim Gielis
Maybe the best of both worlds would be to have DEBUG and INFO output directed to its own file, and WARN / ERROR / FATAL left in the TM1 server message log ? I cannot get that to work, probably because 1 logger can only be used once ?