Customize the debugging methods in SAP jConnect.
You can add calls to other Debug methods.
println – define the message to print in the output log if debugging is enabled and the object is included in the list of classes to debug. The debug output goes to the file you specified with sybdebug.debug.
sybdebug.println(object,message string);
sybdebug.println(this,"Query: "+ query);
myApp(thread[x,y,z]): Query: select * from authors
assert – assert a condition and throw a runtime exception when the condition is not met. You can also define the message to print in the output log if the condition is not met.
sybdebug.assert(object,boolean condition,message string);
sybdebug.assert(this,amount<=buf.length,amount+" too big!");
java.lang.RuntimeException:myApp(thread[x,y,z]): Assertion failed: 513 too big! at jdbc.sybase.utils.sybdebug.assert( sybdebug.java:338) at myApp.myCall(myApp.java:xxx) at .... more stack:
sybdebug.startTimer(object);
sybdebug.stopTimer(object,message string);
sybdebug.startTimer(this); stmt.executeQuery(query); sybdebug.stopTimer(this,"executeQuery");
myApp(thread[x,y,z]):executeQuery elapsed time = 25ms