Page 1 of 1
tm1s-log.properties
Posted: Mon Jun 28, 2010 4:11 pm
by Steve Vincent
Has anyone got a working copy of a tm1s-log.properties file? Its mentioned in 9.5.1 (maybe earlier ones too, not looked) as a way to control some part of what is logged in the server logs. The operations guide says an example of this is supplied with the pdata example server, but it isn't. I've tried to build one based of what little there is in the guide but i've now got the server refusing to log anything. I think it relates to the line below, but not seeing a decent workign example, i have no idea if that is true or what options i have to correct it.
Code: Select all
# S1 is set to be a SharedMemoryAppender
log4j.appender.S1=org.apache.log4j.SharedmemoryAppender
Re: tm1s-log.properties
Posted: Mon Jun 28, 2010 4:35 pm
by MarioRubbo
This is what I have. I believe everything is set up correctly. My problem is that TI logs are written to the UNIX server but I am not able to see them from the TI Editor...
#
# Enable INFO level logging through the rolling file appender, by default. The server
# will write informational messages, as well as errors and warnings to the log file.
#
log4j.rootLogger=INFO, R1
log4j.logger.TM1=INFO
# R1 is set to be a RollingFileAppender
log4j.appender.R1=org.apache.log4j.RollingFileAppender
log4j.appender.R1.File=optimatm1.log
log4j.appender.R1.MaxFileSize=10 MB
log4j.appender.R1.MaxBackupIndex=2
# R1 uses PatternLayout
log4j.appender.R1.layout=org.apache.log4j.PatternLayout
log4j.appender.R1.layout.ConversionPattern=%t %p %d{%Y-%m-%d %H:%M:%S,%Q} %c %m%n
log4j.appender.R1.layout.TimeZone=GMT
Re: tm1s-log.properties
Posted: Tue Jun 29, 2010 1:07 am
by Andy Key
Steve,
I have this in my Contributor sub-directory under 9.5.1. Thought I would include it as it is different to Mario's, and uses the SharedMemoryAppender rather than RollingAppender.
#
# Enable INFO level logging through the shared memory appender, by default. The server
# will write informational messages, as well as errors and warnings to the log file.
#
log4j.logger.TM1=INFO, S1
# S1 is set to be a SharedMemoryAppender
log4j.appender.S1=org.apache.log4j.SharedMemoryAppender
# Specify the size of the shared memory segment
log4j.appender.S1.MemorySize=5 MB
# Specify the max filesize
log4j.appender.S1.MaxFileSize=100 MB
# Specify the max backup index
log4j.appender.S1.MaxBackupIndex=20
# Specify GMT or Local timezone
log4j.appender.S1.TimeZone=GMT
Re: tm1s-log.properties
Posted: Tue Jun 29, 2010 10:22 am
by Steve Vincent
Cheers Guys.
I'm using Win 2003 on the server, don't use contributer or TM1 web. Anyone know if the reference to apache only works if you use web or is that just a coincidence? and what is the difference between the shared and rolling appender? none of that is documented in the stuff i've found so far...
Re: tm1s-log.properties
Posted: Tue Jun 29, 2010 12:42 pm
by Steve Vincent
Andy, just tried your example and it now works fine, thanks a lot for that. Seems the supplied documentation is not to be trusted, not for the first time...
One thing i definately am not ever going to do is change it to debug mode tho - less than a minute, with the server not doing much either, and it created such a long message log i couldn't even open the damn thing! Now i just need to figure out if i can limit what type of events it does / does not log. Ideally i'l like to avoid the automated stuff like chores but i'm not sure it will let me.
Re: tm1s-log.properties
Posted: Tue Jun 29, 2010 2:08 pm
by MarioRubbo
Steve:
At a high level, the reference to Apache is meaningless. This component "log4j" is open source code sponsored by the Apache Foundation to provide a standardized way for Java programs to do logging. Apache also sponsors a web server but that is not in play here. IBM is a big Java proponent and C8 BI is a Java program, so it appears that IBM is beginning to integrate TM1 into the rest of the framework.