Enabling and disabling remote diagnostic logging for the JDBC proxy
To facilitate troubleshooting, HCL DevOps Test Virtualization Control Panel (Test Virtualization Control Panel) administrators can view, download, and share detailed log events information for the JDBC proxy. The capability to display this information in Test Virtualization Control Panel requires enabling remote diagnostic logging for the proxy.
About this task
Test Virtualization Control Panel can display a diagnostic log that is a centralized view of log events of HCL DevOps Test Integrations and APIs (Test Integrations and APIs) proxies.
By default, remote diagnostic logging to Test Virtualization Control Panel is not enabled in the Test Integrations and APIs Agent or in the proxies supplied with Test Virtualization Control Panel.
To enable or disable remote diagnostic logging to Test Virtualization Control Panel for the JDBC proxy, you must modify the startup parameters of the application that you want to record or virtualize.
Procedure
-
Edit the startup parameters as shown in the following table.
Note: In the table, stand-alone Java™ applications and Apache Tomcat are two examples of application server software that is supported by the Test Integrations and APIs JDBC proxy. The following application server software is also supported by the JDBC proxy:
- IBM® WebSphere® Application Server
- Oracle WebLogic Server
- Software AG webMethods Integration Server
- TIBCO BusinessWorks
Table 1. Parameters for enabling and disabling remote diagnostic logging for the JDBC proxy to Test Virtualization Control Panel To: For stand-alone Java™ applications, do the following: For Apache Tomcat, do the following: Enable remote diagnostic logging at debug level to Test Virtualization Control Panel
Note: Available levels are error, warning, info, debug, and trace. TheJava.Util.Logging
(JUL) appender defaults to "level:debug" if level is not set, so all events are passed toJava.Util
and filtered there by the separate configuration.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET=level:DEBUG -Dgreenhat.logappender.jul.JUL
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET=level:DEBUG -Dgreenhat.logappender.jul.JUL
Enable remote diagnostic logging at debug level to Test Virtualization Control Panel and specify the URL for the network log appender.
Note: Available levels are error, warning, info, debug, and trace. Instead of entering a specific URL, you can enterurl:auto
.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver-Dgreenhat.logappender.net.NET=url:http://IP address or hostname:port_number/RTCP,level:DEBUG -Dgreenhat.logappender.jul.JUL
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET=url:http://IP address or host name:port_number/RTCP,level:DEBUG -Dgreenhat.logappender.jul.JUL
Enable remote diagnostic logging at debug level and internal logging to Test Virtualization Control Panel.
Note: Available levels are error, warning, info, debug, and trace.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET=level:DEBUG -Dgreenhat.logappender.jul.JUL -Dgreenhat.loginternal=appender
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET=level:DEBUG -Dgreenhat.logappender.jul.JUL -Dgreenhat.loginternal=appender
Enable remote diagnostic logging at error or warning level to Test Virtualization Control Panel
Note: Default remote log level is warning.Note: TheJava.Util.Logging
(JUL) appender is not present, so there will be no local file logging.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.net.NET
Enable console logging at debug level and use detailed layout.
Note: If Java™ logging is not enabled, you might want to enable console logging. Console logging layout can be detailed, standard, or compact.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG
Enable console logging at debug level, use detailed layout, and log internal framework events.
Note: Internal events will be sent to the console to help diagnose issues within the logging framework.Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG -Dgreenhat.loginternal=console
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG -Dgreenhat.loginternal=console
Disable all logging.
Edit the invocation command line or the system properties within the Java™ application as follows:
-Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.none
Configure the Tomcat startup script as follows:
SET JAVA_OPTS=%JAVA_OPTS% -Djdbc.drivers=com.greenhat.jdbc.Driver -Dgreenhat.logappender.none
- Save your changes.
- Restart the application or application server as required.