|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.jtds.util.Logger
Class providing static methods to log diagnostics.
There are three ways to enable logging:
Field Summary | |
private static char[] |
hex
|
private static java.io.PrintWriter |
log
PrintWriter stream set by DataSource. |
Constructor Summary | |
Logger()
|
Method Summary | |
static java.io.PrintWriter |
getLogWriter()
Get the logging PrintWriter Stream. |
static boolean |
isActive()
Retrieve the active status of the logger. |
static void |
logException(java.lang.Exception e)
Print an Exception stack trace to the log. |
static void |
logPacket(int streamId,
boolean in,
byte[] pkt)
Print a dump of the current input or output network packet. |
static void |
println(java.lang.String message)
Print a diagnostic message to the output stream provided by the DataSource or the DriverManager. |
static void |
setActive(boolean value)
Deprecated. Use the JDBC standard mechanisms to enable logging. |
static void |
setLogWriter(java.io.PrintWriter out)
Set the logging PrintWriter stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.io.PrintWriter log
private static final char[] hex
Constructor Detail |
public Logger()
Method Detail |
public static void setLogWriter(java.io.PrintWriter out)
out
- the PrintWriter streampublic static java.io.PrintWriter getLogWriter()
PrintWriter
public static boolean isActive()
boolean
true if logging enabledpublic static void println(java.lang.String message)
message
- the diagnostic message to printpublic static void logPacket(int streamId, boolean in, byte[] pkt)
streamId
- the owner of this packetin
- true if this is an input packetpkt
- the packet datapublic static void logException(java.lang.Exception e)
e
- the exception to logpublic static void setActive(boolean value)
value
- true to turn on logging
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |