LogOutput fails where AsciiOutput runs fine

Post Reply
Wim Gielis
MVP
Posts: 2460
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:

LogOutput fails where AsciiOutput runs fine

Post by Wim Gielis » Mon Jun 29, 2020 5:50 pm

Hi all,

This line of code works fine:

Code: Select all

AsciiOutput( '\\CUSTOMER.local\dfs$\dhx-public\Applications\BIManRep\Logfiles\TI.log', 'test hello world' );
However, the instructions below do not lead to output when I run the command:

Code: Select all

LogOutput( 'DEBUG', 'test hello world' );
log4j.logger.TM1.TILogOutput=DEBUG, Debug_LogOutput
log4j.appender.Debug_LogOutput=org.apache.log4j.SharedMemoryAppender
log4j.additivity.TM1.TILogOutput=false
log4j.appender.Debug_LogOutput.TimeZone=Local
# log4j.appender.Debug_LogOutput.File=TI.log
log4j.appender.Debug_LogOutput.File=\\CUSTOMER.local\dfs$\dhx-public\Applications\BIManRep\Logfiles\TI.log
log4j.appender.Debug_LogOutput.MaxFileSize=100 MB
If I use the logging directory as the output folder (so I uncomment line 5 above and I comment line 6), TM1 generates the file the way it should.
Hence, I don't think there's an issue with the tm1s-log.properties file.

Can someone spot any issue or error, which explains why the TI.log file is not created as it should ?
The way I understand it, is that the TM1 service account has write privileges to the folder, as confirmed by AsciiOutput. Then what is stopping LogOutput from working ? The folder is on a different server but AsciiOutput does not seem to complain, though.

Thanks !
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 112 TM1 articles and a lot of custom code
Newest blog article: Selecting elements in the Subset Editor quickly

User avatar
gtonkin
MVP
Posts: 803
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 fails where AsciiOutput runs fine

Post by gtonkin » Mon Jun 29, 2020 6:30 pm

Hi Wim,
Cannot test for you but you may need to escape the backslashes e.g. \\\\customer.local\\...
Or switch them to forward slashes e.g. //customer.local/...

tomok
MVP
Posts: 2737
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 fails where AsciiOutput runs fine

Post by tomok » Mon Jun 29, 2020 8:05 pm

Have you ever done this before, meaning have a logging directory housed on a different server? Or is it just not working this time?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/

Wim Gielis
MVP
Posts: 2460
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 fails where AsciiOutput runs fine

Post by Wim Gielis » Mon Jun 29, 2020 8:10 pm

gtonkin wrote:
Mon Jun 29, 2020 6:30 pm
Hi Wim,
Cannot test for you but you may need to escape the backslashes e.g. \\\\customer.local\\...
Or switch them to forward slashes e.g. //customer.local/...
Many thanks, both methods work. I am pretty sure I tried the / character and it seemed to not work during the tests, but now it does. I probably had a typo.

I did not know that escaping was needed, though. Good to know.

Tomok: the customer asked me to redirect all the logfiles (both the TM1 logging directory as well as our own custom logging). Corporate controllers should have an easy access to these files, to quickly see what gives minor errors in a TI process or consult our custom logging. Before today, all the logfiles sat on the TM1 server itself.

Thanks both.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 112 TM1 articles and a lot of custom code
Newest blog article: Selecting elements in the Subset Editor quickly

Post Reply