Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

Turning On and Off DataDirect Spy Logging

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 9.0
    • Documentation

Once DataDirect Spy logging is enabled for a connection, you can turn on and off the logging at runtime using the setEnableLogging method in the com.ddtek.jdbc.extensions.ExtLogControl interface. When DataDirect Spy logging is enabled, all Connection objects returned to an application provide an implementation of the ExtLogControl interface.

For example, the following code turns off logging using setEnableLogging(false):

import com.ddtek.jdbc.extensions.*
 
// Get Database Connection
Connection con = DriverManager.getConnection
("jdbc:openaccess://QANT:4003;User=TEST;Password=secret;
SpyAttributes=(log=(file)/tmp/spy.log");
 
((ExtLogControl) con).setEnableLogging(false);
...

The setEnableLogging method only turns on and off logging if DataDirect Spy logging has already been enabled for a connection; it does not set or change DataDirect Spy attributes. See Enabling DataDirect Spy for information about enabling and customizing DataDirect Spy logging.

TitleResults for “How to create a CRG?”Also Available inAlert