How to enable debug logging for detailed TIBCO Data Virtualization server level logs in log4j2.properties file?

How to enable debug logging for detailed TIBCO Data Virtualization server level logs in log4j2.properties file?

book

Article ID: KB0070943

calendar_today

Updated On:

Products Versions
TIBCO Data Virtualization TIBCO Data Virtualization version 8.5.x and above

Description

This article outlines the process of enabling debug logging flags in the log4j2.properties file for TIBCO Data Virtualization. This is a crucial step in troubleshooting and diagnosing issues, as it allows for capturing more detailed log entries, aiding in tracking system behavior effectively.

Issue/Introduction

This article provides details on how to enable debug flags within the log4j2.properties file of TIBCO Data Virtualization.

Environment

All Supported Environments

Resolution

In this example, we will be discussing the steps to turn on cache refresh debug from the log4j2.properties file. Below are the steps to enable debugging:
(1)   Back up the file <TDV_SERVER>/conf/server/log4j2.properties on the TIBCO Data Virtualization Server.
(2)   Append the following lines to the 'log4j2.properties' file or uncomment the existing lines, which will enable debug logging specifically for cache refresh:
logger.server_cache.name = com.compositesw.server.cache
logger.server_cache.level = DEBUG

(3)  To activate the debug trace, you should restart the TDV Server. However, if you prefer not to restart it, you can use an alternative approach:
  • Navigate to Studio > Administration > Configuration > Server > Configuration > Debugging > Debug Output Enabled.
  • Change the value to “True”.
  • Click “Apply” but don’t close the window.
  • Immediately change the value back to “False”.
  • Click “Apply” and close the window.
User-added image

(4)  Once debugging is enabled, you can proceed to reproduce the issue you're troubleshooting. The debug entries will be reflected in the 'cs_server.log' file. 
      Sample Entries:
DEBUG [Cache Task Processor] 2023-10-31 18:23:23.410 -0400 CacheSql - loaded cs:Status: UNKNOWN message:  [ probe set{}  active=[5002,/shared/IB_externalcaching/Oracle19c/SUPPORT1/Prajakta_cacheview0] refresh set{}  inactive=4017(C) lastFailedLoadTime=none lastSuccessLoadTime=Tue Oct 31 18:23:22 EDT 2023]
DEBUG [Cache Task Processor] 2023-10-31 18:23:23.510 -0400 CacheStatus - Cache status loaded for /shared/IB_externalcaching/Cache_view
DEBUG [Cache Task Processor] 2023-10-31 18:23:23.510 -0400 CacheTaskThread - Cache task thread going to sleep until next 
 
(5) To disable debug logging, comment the .level=DEBUG lines in the log4j2.properties / if new lines were added, then remove them. Carry out Step (3) once more to reload the log4j2 file to disable debug.