10.07.2015 Views

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

JDBC Developer's Guide - Supra - Cincom

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Logging <strong>JDBC</strong> callsThe <strong>Cincom</strong> ORDB <strong>JDBC</strong> Driver can produce log records that may aid yourdebugging efforts. The log can be enabled for the entire application, or for asingle connection.♦To produce log records for <strong>JDBC</strong> calls, set the “logging” property to“<strong>JDBC</strong>”.♦ To produce a more detailed log, set the “logging” property to “ALL”.The log output will be written to the location specified by the setLogWriter()method of java.sql.DriverManager. Log records will be written to standardoutput if no log writer has been established with the setLogWriter() method.Example: Turning on all logging. The following example turns on all loggingfor a connection:java.util.Properties info = new java.util.Properties();info.put ("user", "public");info.put ("password", NULL);info.put ("logging", "ALL");getConnection ("jdbc:cincomordb:demodb",info);Example: Enabling logging at application start-up. The following exampleenables logging at application start-up time; prefix the “logging” with“ordbjava.jdbc.” on your java command:java –Dordbjava.jdbc.logging=ALL <strong>JDBC</strong> <strong>Developer's</strong> <strong>Guide</strong>, P25-9504-03 Page 92Chapter: 6. Coding tips and troubleshootingSection: Logging <strong>JDBC</strong> calls

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!