public class Logger
extends java.lang.Object
There are three ways to enable logging:
Modifier and Type | Field and Description |
---|---|
private static char[] |
hex |
private static java.io.PrintWriter |
log
PrintWriter stream set by DataSource.
|
Constructor and Description |
---|
Logger() |
Modifier and Type | Method and Description |
---|---|
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.
|
private static java.io.PrintWriter log
private static final char[] hex
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)
Print a diagnostic message to the output stream provided by the
DataSource
or the DriverManager
.
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 loggingGenerated on June 8 2013