Configuring logging parameters in tm1s-log.properties
Logging output is configured in the appender section of the tm1s-log.properties file with the following parameters.
Parameter |
Description |
---|---|
MemorySize |
Specifies the size of the shared memory segment. This memory represents the area of system memory where log messages are sent before being written to the log file. Default value is 5 MB. Use the following format: log4j.appender.S1.MemorySize=Size Units where:
For example, to set the MemorySize to 5 MB, enter the following: log4j.appender.S1.MemorySize=5 MB |
MaxFileSize |
Specifies the maximum file size that the log file is allowed to take up on disk. Default size is 100 MB. Uses the following format: log4j.appender.S1.MaxFileSize=SizeUnits where:
For example, to limit the log file size to 10 MB, enter the following: log4j.appender.S1.MaxFileSize=10 MB If the MaxBackupIndex parameter is set to 1 or greater, then the logging process automatically creates a backup file when the log file reaches the MaxFileSize. The total number of backup files is determined by MaxBackupIndex option. |
MaxBackupIndex |
A numeric value that specifies how many backup files are kept before the oldest log file is erased. Default value is 20.
The backup process repeats each time the MaxFileSize is reached, overwriting the oldest backup file so that only the newest backup files remains. |
TimeZone |
Specifies the timezone for the message timestamps in the log file. Uses the following format: log4j.appender.S1.TimeZone=Zone where Zone can be set to either GMT or Local.
|
File |
Specifies the log file. For example: log4j.appender.S2.File=tm1event.log where the filename is tm1event or tm1top.log For example, to generate critical log messages using the ops logger: log4j.logger.Event=INFO, S2 log4j.appender.S2=org.apache.log4j.SharedMemoryAppender log4j.appender.S2.MemorySize=5 MB log4j.appender.S2.MaxFileSize=100 MB log4j.appender.S2.MaxBackupIndex=1 log4j.appender.S2.TimeZone=Local log4j.appender.S2.File=tm1event.log log4j.appender.S2.Format=TM1Event |
Format |
Specifies the format of the logs. For example: log4j.appender.S2.Format=TM1Event where the format is TM1Event or TM1Top For example, to dynamically monitor the threads that are running and outputs thread status to the tm1top.log: log4j.logger.Top=INFO, S_Top log4j.appender.S_Top=org.apache.log4j.SharedMemoryAppender log4j.appender.S_Top.MemorySize=5 MB log4j.appender.S_Top.MaxFileSize=100 MB log4j.appender.S_Top.MaxBackupIndex=20 log4j.appender.S_Top.File=tm1top.log log4j.appender.S_Top.Format=TM1Top |