Hi,
The daily TM1Web log file size is very huge and I want to reduce the size of it. Is there anything that we can write in the config file to reduce the size of TM1Web daily file?
Thanks
KKMK
How to reduce the size of TM1Web log files
-
- MVP
- Posts: 2836
- 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: How to reduce the size of TM1Web log files
IBM Cognos Web LogTM1
The IBM® Cognos® TM1® Web log records messages for IBM Cognos TM1 Web activity and errors. The log file is an ASCII text file that you can open in any text editor, such as Microsoft® Windows® Notepad.
Configuring and Enabling IBM Cognos Web LoggingTM1
The configuration for IBM® Cognos® TM1® Web logging is stored in a logging properties section of the TM1 Web.config file. You can edit the properties in this file to adjust the logging message level.
Logging is enabled when the logging properties in the web.config file are correctly configured to turn on logging. Logging for IBM Cognos TM1 Web is configured by default when IBM Cognos TM1 Web is installed.
The web.config file is installed in the TM1 Web install_directory. If you installed IBM Cognos TM1 Web to the default installation location, the web.config file is located in the directory C:\Inetpub\wwwroot\TM1Web.
Note: The default web logging configuration is intended for every-day use and does not typically require adjustment. For assistance if you need to configure the logging properties for troubleshooting purposes, see the IBM CognosResource Center (http://www.ibm.com/software/data/suppor ... s_crc.html).
The following is a sample of the logging properties section in the web.config file.
<log4net>
<root>
<level value="ERROR" />
<appender-ref ref="LogFileAppender" />
</root>
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="log\tm1web_err.log" />
<appendToFile value="true" />
<datePattern value="yyyyMMdd" />
<rollingStyle value="Date" />
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="INFO" />
<levelMax value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level
%logger - %message%newline" />
</layout>
</appender>
</log4net>
Where:
The message level is indicated by: <level value="ERROR" />
The log file name is indicated by: <file value="log\tm1web_err.log" />
the minimum and maximum message level ranges are indicated by:
<levelMin value="INFO" />
<levelMax value="FATAL" />
Steps to change the logging message level:
Open the web.config file in a text editor, such as Microsoft Windows Notepad.
Locate the following section of code:
<level value="ERROR" />
Change the level to one of the valid values; DEBUG, INFO, or ERROR.
For example, to change the message level to DEBUG, edit this line as follows:
<level value="DEBUG" />
Locate the settings for the levelMin and levelMax parameters.
<levelMin value="INFO" />
<levelMax value="FATAL" />
Adjust the values for the levelMin and levelMax parameters to a range that includes the level you want to log.
For example, to log DEBUG level messages, change the levelMin parameter to DEBUG.
<levelMin value="DEBUG" />
<levelMax value="FATAL" />
Save and close the file.
Viewing the IBM Cognos Web Log FileTM1
The IBM® Cognos® TM1® Web installation configures IBM Cognos TM1 Web logging to write messages to the tm1web_err.log file in the following location:
<TM1Web_install_directory>\log
If you installed IBM Cognos TM1 Web to the default installation location, then the tm1web_err.log file is located in the following directory:
C:\Inetpub\wwwroot\TM1Web\log
For backup purposes, a copy of the tm1web_err.log file is renamed and saved on a daily basis using the following naming convention:
tm1web_err.log<year><mm><dd>
For example, tm1web_err.log20070116.
Steps
Locate the tm1web_err.log file in the TM1Web install directory\log\ directory.
Open and view the file with a text editor, such as Microsoft Windows Notepad.
Each line in the log file represents one unique message, arranged in the following format:
2007-01-17 11:13:36,916 [2600] ERROR Cognos.TM1.Web.PageTM1WebpageUtils
- <Chores> not localized
Where:
2007-01-17 11:13:36,916 is the date and time
[2600] is the thread ID
ERROR is the message level
Cognos.TM1.Web.PageTM1WebpageUtils is the sub-component name
<Chores> not localized is the message text.