How to retain additional logs for TIBCO Data Virtualization Server instance?

How to retain additional logs for TIBCO Data Virtualization Server instance?

book

Article ID: KB0072030

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization 8.5 and later

Description

This article provides details on how to control the log files size and the number of logs files to be saved in TIBCO Data Virtualization. This helps during debugging scenario to save more entries in the log files.  

Environment

All supported Operating Systems

Resolution

In this example, we will be discussing the steps to increase the log file size for "cs_server.log" file from the log4j2.properties file. Note: Only the log files mentioned in the [TDV_Server_dir]\conf\server\log4j2.properties file under the 'fileName' property can be updated using this method. 

(1) Save a backup of the log4j2.properties file located at "[TDV_Server_dir]\conf\server\" path to a separate location.

(2) Open [TDV_Server_dir]\conf\server\log4j2.properties file and locate the cs_server.log file block by searching the 'fileName'. 
Example: appender.MAIN.fileName=C:/Program Files/TIBCO/TDV Server 8.5-9010/logs/cs_server.log

- To increase the size of each log file, update the value for 'policies.size.size' for cs_server.log to a desirable amount. Default size for each log file is 10 MB
- To increase the number of log file, update the value for 'appender.MAIN.strategy.max' for cs_server.log to a desirable amount. Default number of log files is 10 for each log file type.  

In the following example, the size of each log file is increased to 100MB and the number of log files increased to 25: 

appender.MAIN.type=RollingFile
appender.MAIN.name=MAIN
appender.MAIN.fileName=C:/Program Files/TIBCO/TDV Server 8.5-9010/logs/cs_server.log
appender.MAIN.filePattern=C:/Program Files/TIBCO/TDV Server 8.5-9010/logs/cs_server%i.log
appender.MAIN.layout.type=PatternLayout
appender.MAIN.layout.pattern=%p [%t] %d{yyyy-MM-dd HH:mm:ss.SSS Z} %c{1} - %m%n
appender.MAIN.policies.type = Policies
appender.MAIN.policies.size.type = SizeBasedTriggeringPolicy
appender.MAIN.policies.size.size=100MB
appender.MAIN.strategy.type = DefaultRolloverStrategy
appender.MAIN.strategy.max = 25

Save the file. 
(3) For the log file changes in log4j2.properties file to take effect, restart the DV Server (only monitor services).

(4) Larger size and more number of cs_server.log file(s) will show up under [TDV_Server_dir]\logs. 

Issue/Introduction

How to retain additional logs for TIBCO Data Virtualization Server instance?