All Packages Class Hierarchy This Package Previous Next Index
Class oracle.jdbc.driver.OracleLog
java.lang.Object
|
+----oracle.jdbc.driver.OracleLog
- public class OracleLog
- extends Object
-
CATEGORY_ALL
-
-
CATEGORY_HIGH_VOL
-
-
CATEGORY_LOW_VOL
-
-
CATEGORY_MED_VOL
-
-
CATEGORY_TOTAL
-
-
CategoryName
-
-
DEBUG1
-
-
DEBUG2
-
-
ERROR
-
-
FIELD_ALL
-
-
FIELD_CATEGORY
-
-
FIELD_CONN
-
-
FIELD_DEFAULT
-
-
FIELD_MODULE
-
-
FIELD_NONE
-
-
FIELD_SUBMOD
-
-
FIELD_THREAD
-
-
FIELD_TIME
-
-
FUNCTION
-
-
MASK_ALL_SET
-
-
MAX_MODULES
-
-
MAX_VECTOR_BITS
-
-
MODULE_ALL
-
-
MODULE_DBACCESS
-
-
MODULE_DBCONV
-
-
MODULE_DRIVER
-
-
MODULE_JOLT
-
-
MODULE_TOTAL
-
-
ModuleName
-
-
PROG_ERROR
-
-
SUBMOD_ALL
-
-
SUBMOD_DBAC_DATA
-
-
SUBMOD_DEFAULT
-
-
SUBMOD_DRVR_CONN
-
-
SUBMOD_DRVR_ERR
-
-
SUBMOD_DRVR_LOG
-
-
SUBMOD_DRVR_RSET
-
-
SUBMOD_DRVR_STMT
-
-
SUBMOD_DRVR_UTIL
-
-
TRACE
-
-
USER_OPER
-
-
WARNING
-
-
OracleLog()
-
-
bytesToFormattedStr(byte[], int, String)
- Format bytes into a string of printable form.
-
bytesToPrintableForm(String, byte[])
- Present byte array into printable form.
-
bytesToPrintableForm(String, byte[], int)
- Present byte array into printable form.
-
charsToUcs2Bytes(char[])
- Convert a character array into UCS-2 bytes (2 bytes per character).
-
charsToUcs2Bytes(char[], int)
- Convert a character array into UCS-2 bytes (2 bytes per character).
-
config(int, int, int)
- Configure tracing with the specified filtering masks.
-
getBitNumFromVector(int)
- Obtain bit number from a bit vector
-
getCategoryName(int)
- Obtain the name of a category.
-
getLogStream()
- Get the logging PrintStream.
-
getLogWriter()
- Get the logging PrintWriter.
-
getModuleName(int)
- Obtain the name of a module.
-
info()
- Obtain information about the current settings.
-
isEnabled()
- Check if logging is enabled.
-
print(int, int, int, String)
-
-
print(int, int, String)
-
-
print(OracleConnection, int, int, int, String)
- Print a message to the JDBC log stream.
-
print(OracleConnection, int, int, String)
-
-
setLogStream(PrintStream)
- Set the logging PrintStream.
-
setLogWriter(PrintWriter)
- Set the logging PrintWriter.
-
setMaxPrintBytes(int)
- Configure the maximum number of bytes to be printed in each message.
-
setSubmodMask(int, int)
- Configure the sub-module mask for a module.
-
strToUcs2Bytes(String)
- Convert a string into UCS-2 bytes (2 bytes per character).
-
test()
-
MASK_ALL_SET
public static final int MASK_ALL_SET
MAX_VECTOR_BITS
public static final int MAX_VECTOR_BITS
MAX_MODULES
public static final int MAX_MODULES
MODULE_ALL
public static final int MODULE_ALL
MODULE_DRIVER
public static final int MODULE_DRIVER
MODULE_DBACCESS
public static final int MODULE_DBACCESS
MODULE_DBCONV
public static final int MODULE_DBCONV
MODULE_JOLT
public static final int MODULE_JOLT
MODULE_TOTAL
public static final int MODULE_TOTAL
ModuleName
public static final String ModuleName[]
SUBMOD_ALL
public static final int SUBMOD_ALL
SUBMOD_DEFAULT
public static final int SUBMOD_DEFAULT
SUBMOD_DRVR_LOG
public static final int SUBMOD_DRVR_LOG
SUBMOD_DRVR_ERR
public static final int SUBMOD_DRVR_ERR
SUBMOD_DRVR_CONN
public static final int SUBMOD_DRVR_CONN
SUBMOD_DRVR_STMT
public static final int SUBMOD_DRVR_STMT
SUBMOD_DRVR_RSET
public static final int SUBMOD_DRVR_RSET
SUBMOD_DRVR_UTIL
public static final int SUBMOD_DRVR_UTIL
SUBMOD_DBAC_DATA
public static final int SUBMOD_DBAC_DATA
CATEGORY_ALL
public static final int CATEGORY_ALL
USER_OPER
public static final int USER_OPER
PROG_ERROR
public static final int PROG_ERROR
ERROR
public static final int ERROR
WARNING
public static final int WARNING
FUNCTION
public static final int FUNCTION
DEBUG1
public static final int DEBUG1
DEBUG2
public static final int DEBUG2
CATEGORY_TOTAL
public static final int CATEGORY_TOTAL
CategoryName
public static final String CategoryName[]
CATEGORY_LOW_VOL
public static final int CATEGORY_LOW_VOL
CATEGORY_MED_VOL
public static final int CATEGORY_MED_VOL
CATEGORY_HIGH_VOL
public static final int CATEGORY_HIGH_VOL
FIELD_NONE
public static final int FIELD_NONE
FIELD_ALL
public static final int FIELD_ALL
FIELD_TIME
public static final int FIELD_TIME
FIELD_MODULE
public static final int FIELD_MODULE
FIELD_SUBMOD
public static final int FIELD_SUBMOD
FIELD_CATEGORY
public static final int FIELD_CATEGORY
FIELD_CONN
public static final int FIELD_CONN
FIELD_THREAD
public static final int FIELD_THREAD
FIELD_DEFAULT
public static final int FIELD_DEFAULT
TRACE
public static boolean TRACE
OracleLog
public OracleLog()
isEnabled
public static boolean isEnabled()
- Check if logging is enabled.
- Returns:
- true if logging is enabled, or false if not.
setLogWriter
public static void setLogWriter(PrintWriter out)
- Set the logging PrintWriter.
This method is also used to enable and disable logging.
- Parameters:
- out
PrintWriter - object (use null to disable logging).
getLogWriter
public static PrintWriter getLogWriter()
- Get the logging PrintWriter.
- Returns:
- the logging PrintWriter, or null if logging is disabled.
setLogStream
public static void setLogStream(PrintStream out)
- Set the logging PrintStream. This method is also used to enable
and disable logging.
- Parameters:
- out
PrintStream - (use null to disable logging).
getLogStream
public static PrintStream getLogStream()
- Get the logging PrintStream.
- Returns:
- the logging PrintStream, or null if logging is disabled.
config
public static void config(int printMask,
int moduleMask,
int categoryMask)
- Configure tracing with the specified filtering masks.
- Parameters:
- printMask
32-bit - mask specifying attributes to be logged.
(See defined constants for the available attributes.)
- moduleMask
32-bit - mask specifying the modules to be enabled.
(See defined constants for the available modules.)
- categoryMask
32-bit - mask specifying the categories to be enabled.
(See defined constants for the available categories.)
setSubmodMask
public static void setSubmodMask(int module,
int submodMask)
- Configure the sub-module mask for a module.
- Parameters:
- module
module - identifier.
- submodMask
32-bit - mask specifying the sub-modules to be enabled.
setMaxPrintBytes
public static void setMaxPrintBytes(int maxbytes)
- Configure the maximum number of bytes to be printed in each message.
This setting only limits the size of the printed byte arrays.
- Parameters:
- maxbytes
maximum - number of bytes to be printed.
print
public static void print(OracleConnection conn,
int module,
int submodule,
int category,
String message)
- Print a message to the JDBC log stream.
This method contains the actual implementation of print(). Other
versions (with different signatures) invoke this method to log
messages.
It is important to note that an "if (OracleLog.TRACE)" clause must
be used to avoid unnecessary computation on the arguments on this
method when tracing is disabled.
- Parameters:
- conn
Jdbc - connection.
- module
module - identifier.
- submodule
sub-module - identifier.
- category
message - category.
- message
message - string.
print
public static void print(OracleConnection conn,
int module,
int category,
String message)
print
public static void print(int module,
int submodule,
int category,
String message)
print
public static void print(int module,
int category,
String message)
info
public static String info()
- Obtain information about the current settings.
- Returns:
- information about the current setting of OracleLog
getModuleName
public static String getModuleName(int module)
- Obtain the name of a module.
- Parameters:
- module
module - identifier.
- Returns:
- the name of the specified module
getCategoryName
public static String getCategoryName(int category)
- Obtain the name of a category.
- Parameters:
- category
category - identifier.
- Returns:
- the name of the specified category
getBitNumFromVector
public static int getBitNumFromVector(int bitVector)
- Obtain bit number from a bit vector
- Parameters:
- bitVector
input - bit vector.
- Returns:
- the number of the first bit set in the input vector.
bytesToPrintableForm
public static String bytesToPrintableForm(String header,
byte bytes[])
- Present byte array into printable form.
Bytes are formatted in hexadecimal. The output is limited to the
maximum number of bytes set by setMaxPrintBytes().
- Parameters:
- header
heading - of the returned string.
- bytes
input - byte array.
- Returns:
- the printable string.
bytesToPrintableForm
public static String bytesToPrintableForm(String header,
byte bytes[],
int nbytes)
- Present byte array into printable form.
Bytes are formatted in hexadecimal. The output is limited to the
maximum number of bytes set by setMaxPrintBytes().
- Parameters:
- header
heading - of the returned string.
- bytes
input - byte array.
- nbytes
number - of valid bytes in the input array.
- Returns:
- the printable string.
bytesToFormattedStr
public static String bytesToFormattedStr(byte bytes[],
int nbytes,
String margin)
- Format bytes into a string of printable form.
Bytes are formatted in hexadecimal. The output is limited to the
maximum number of bytes set by setMaxPrintBytes().
- Parameters:
- bytes
input - byte array.
- nbytes
number - of valid bytes in the input array.
- margin
left - margin of the printable block. Use null if no
margin is needed.
- Returns:
- the formatted string.
strToUcs2Bytes
public static byte[] strToUcs2Bytes(String str)
- Convert a string into UCS-2 bytes (2 bytes per character).
- Parameters:
- str
input - string.
- Returns:
- the output byte array, or null if the input string
is null.
charsToUcs2Bytes
public static byte[] charsToUcs2Bytes(char chars[])
- Convert a character array into UCS-2 bytes (2 bytes per character).
- Parameters:
- chars
input - character array.
- Returns:
- the output byte array, or null if the input character
array is null.
charsToUcs2Bytes
public static byte[] charsToUcs2Bytes(char chars[],
int nchars)
- Convert a character array into UCS-2 bytes (2 bytes per character).
- Parameters:
- chars
input - character array.
- nchars
number - of valid characters in the input character
array.
- Returns:
- the ouput byte array.
test
public static void test()
All Packages Class Hierarchy This Package Previous Next Index