LOGOUTPUT to separate log file

Post Reply
tomok
MVP
Posts: 2645
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 » Thu Nov 21, 2019 4:14 pm

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: 742
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: PAL 2.0.3
Excel Version: 2016 64-bit
Location: JHB, South Africa
Contact:

Re: LOGOUTPUT to separate log file

Post by gtonkin » Thu Nov 21, 2019 5:48 pm

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 » 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

tomok
MVP
Posts: 2645
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 » Thu Nov 21, 2019 7:43 pm

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: 2278
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: LOGOUTPUT to separate log file

Post by Wim Gielis » Thu Nov 21, 2019 8:30 pm

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

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

Post Reply