Page 1 of 1

LogOutput fails where AsciiOutput runs fine

Posted: Mon Jun 29, 2020 5:50 pm
by Wim Gielis
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 !

Re: LogOutput fails where AsciiOutput runs fine

Posted: Mon Jun 29, 2020 6:30 pm
by gtonkin
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/...

Re: LogOutput fails where AsciiOutput runs fine

Posted: Mon Jun 29, 2020 8:05 pm
by tomok
Have you ever done this before, meaning have a logging directory housed on a different server? Or is it just not working this time?

Re: LogOutput fails where AsciiOutput runs fine

Posted: Mon Jun 29, 2020 8:10 pm
by Wim Gielis
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.