Fun with Logging...

Post Reply
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Fun with Logging...

Post by fleaster »

Ok, so I have been dabbling with the tm1s-log.properties file on our TM1 9.5.2 server - basically I would like the level of logging to be INFO for all events, except SQLAPI messages, which should be set to WARN.

I added the statement "log4j.logger.TM1.SQLAPI=WARN" to my tm1s-log.properties file below, but doesn't seem to be working as expected... anyone have any ideas what went wrong with my code? :(

Cheers,

Matt

Code: Select all

#
#  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.rootLogger=INFO, S1
log4j.logger.TM1=INFO, S1

### Added to reduce SQLAPI messages...
### e.g.  6624 [f] INFO 2012-08-03 06:16:53.036 TM1.SQLAPI fetched 1 row
log4j.logger.TM1.SQLAPI=WARN

# S1 is set to be a SharedMemoryAppender
log4j.appender.S1=org.apache.log4j.SharedMemoryAppender
log4j.appender.S1.File=tm1server.log

# Specify the size of the shared memory segment
log4j.appender.S1.MemorySize=5 MB

# Specify the max filesize
log4j.appender.S1.MaxFileSize=20 MB

# Specify the max backup index
log4j.appender.S1.MaxBackupIndex=20

# S1 uses PatternLayout
log4j.appender.S1.layout=org.apache.log4j.PatternLayout
log4j.appender.S1.layout.ConversionPattern=%t   %p   %d{%Y-%m-%d %H:%M:%S,%Q}   %c   %m%n

# Specify GMT or Local timezone
log4j.appender.S1.TimeZone=Local
User avatar
jameswebber
Community Contributor
Posts: 188
Joined: Sun Nov 21, 2010 8:00 pm
OLAP Product: Cognos Express 10
Version: CE 10.1.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Fun with Logging...

Post by jameswebber »

This is my log properties if it helps:

Code: Select all

log4j.logger.TM1=INFO, S1
log4j.logger.TM1.SQLAPI=WARN
log4j.logger.TM1.Comm.SSL=WARN

# 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
#JW dropped this to 30 as 100 MB seems to not be in effect
log4j.appender.S1.MaxFileSize=30 MB
# Specify the max backup index
log4j.appender.S1.MaxBackupIndex=20
# Specify GMT or Local timezone
log4j.appender.S1.TimeZone=Local
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Fun with Logging...

Post by fleaster »

Thanks for that - well I ended up settling for "log4j.logger.TM1.SQLAPI=WARN, S1" , which seems to work ok now ie the generic INFO messages are excluded, but it still includes WARN messages etc

Matt

Code: Select all

# 
log4j.rootLogger=INFO, S1
log4j.logger.TM1=INFO, S1

# 121107-reduce SQLAPI messages
log4j.logger.TM1.SQLAPI=WARN, S1

# S1 is set to be a SharedMemoryAppender
log4j.appender.S1=org.apache.log4j.SharedMemoryAppender
log4j.appender.S1.File=tm1server.log

# Specify the size of the shared memory segment
log4j.appender.S1.MemorySize=5 MB

# Specify the max filesize
log4j.appender.S1.MaxFileSize=50 MB

# Specify the max backup index
log4j.appender.S1.MaxBackupIndex=20

# S1 uses PatternLayout
log4j.appender.S1.layout=org.apache.log4j.PatternLayout
log4j.appender.S1.layout.ConversionPattern=%t   %p   %d{%Y-%m-%d %H:%M:%S,%Q}   %c   %m%n

# Specify GMT or Local timezone
log4j.appender.S1.TimeZone=Local
ps_in_atl
Posts: 12
Joined: Fri Apr 01, 2011 12:55 pm
OLAP Product: Cognos TM1
Version: 10.1.1 x64_MS Server 2008
Excel Version: Excel 2007

Re: Fun with Logging...

Post by ps_in_atl »

Does anyone know where we can get a list of the different loggers (individual parts we can control)? IBM documentation says to ask Customer Support, but you know how that goes...
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Fun with Logging...

Post by fleaster »

Hi ps,
the link I was given by someone previously was to the LOG4J site: http://logging.apache.org/log4j/1.2/manual.html

...it details all the different components of the logger... personally, I found it a bit hard to follow :p

Matt
Post Reply