LOGOUTPUT to separate log file

Post Reply
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

LOGOUTPUT to separate log file

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
User avatar
gtonkin
MVP
Posts: 1202
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: LOGOUTPUT to separate log file

Post 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:
Andrew_M
Posts: 6
Joined: Thu Jun 07, 2012 12:47 pm
OLAP Product: Tm1
Version: 10.1
Excel Version: 2k10

Re: LOGOUTPUT to separate log file

Post 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
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: LOGOUTPUT to separate log file

Post 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.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: LOGOUTPUT to separate log file

Post 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 ?
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply