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

Variable Index

 o CATEGORY_ALL
 o CATEGORY_HIGH_VOL
 o CATEGORY_LOW_VOL
 o CATEGORY_MED_VOL
 o CATEGORY_TOTAL
 o CategoryName
 o DEBUG1
 o DEBUG2
 o ERROR
 o FIELD_ALL
 o FIELD_CATEGORY
 o FIELD_CONN
 o FIELD_DEFAULT
 o FIELD_MODULE
 o FIELD_NONE
 o FIELD_SUBMOD
 o FIELD_THREAD
 o FIELD_TIME
 o FUNCTION
 o MASK_ALL_SET
 o MAX_MODULES
 o MAX_VECTOR_BITS
 o MODULE_ALL
 o MODULE_DBACCESS
 o MODULE_DBCONV
 o MODULE_DRIVER
 o MODULE_JOLT
 o MODULE_TOTAL
 o ModuleName
 o PROG_ERROR
 o SUBMOD_ALL
 o SUBMOD_DBAC_DATA
 o SUBMOD_DEFAULT
 o SUBMOD_DRVR_CONN
 o SUBMOD_DRVR_ERR
 o SUBMOD_DRVR_LOG
 o SUBMOD_DRVR_RSET
 o SUBMOD_DRVR_STMT
 o SUBMOD_DRVR_UTIL
 o TRACE
 o USER_OPER
 o WARNING

Constructor Index

 o OracleLog()

Method Index

 o bytesToFormattedStr(byte[], int, String)
Format bytes into a string of printable form.
 o bytesToPrintableForm(String, byte[])
Present byte array into printable form.
 o bytesToPrintableForm(String, byte[], int)
Present byte array into printable form.
 o charsToUcs2Bytes(char[])
Convert a character array into UCS-2 bytes (2 bytes per character).
 o charsToUcs2Bytes(char[], int)
Convert a character array into UCS-2 bytes (2 bytes per character).
 o config(int, int, int)
Configure tracing with the specified filtering masks.
 o getBitNumFromVector(int)
Obtain bit number from a bit vector
 o getCategoryName(int)
Obtain the name of a category.
 o getLogStream()
Get the logging PrintStream.
 o getLogWriter()
Get the logging PrintWriter.
 o getModuleName(int)
Obtain the name of a module.
 o info()
Obtain information about the current settings.
 o isEnabled()
Check if logging is enabled.
 o print(int, int, int, String)
 o print(int, int, String)
 o print(OracleConnection, int, int, int, String)
Print a message to the JDBC log stream.
 o print(OracleConnection, int, int, String)
 o setLogStream(PrintStream)
Set the logging PrintStream.
 o setLogWriter(PrintWriter)
Set the logging PrintWriter.
 o setMaxPrintBytes(int)
Configure the maximum number of bytes to be printed in each message.
 o setSubmodMask(int, int)
Configure the sub-module mask for a module.
 o strToUcs2Bytes(String)
Convert a string into UCS-2 bytes (2 bytes per character).
 o test()

Variables

 o MASK_ALL_SET
 public static final int MASK_ALL_SET
 o MAX_VECTOR_BITS
 public static final int MAX_VECTOR_BITS
 o MAX_MODULES
 public static final int MAX_MODULES
 o MODULE_ALL
 public static final int MODULE_ALL
 o MODULE_DRIVER
 public static final int MODULE_DRIVER
 o MODULE_DBACCESS
 public static final int MODULE_DBACCESS
 o MODULE_DBCONV
 public static final int MODULE_DBCONV
 o MODULE_JOLT
 public static final int MODULE_JOLT
 o MODULE_TOTAL
 public static final int MODULE_TOTAL
 o ModuleName
 public static final String ModuleName[]
 o SUBMOD_ALL
 public static final int SUBMOD_ALL
 o SUBMOD_DEFAULT
 public static final int SUBMOD_DEFAULT
 o SUBMOD_DRVR_LOG
 public static final int SUBMOD_DRVR_LOG
 o SUBMOD_DRVR_ERR
 public static final int SUBMOD_DRVR_ERR
 o SUBMOD_DRVR_CONN
 public static final int SUBMOD_DRVR_CONN
 o SUBMOD_DRVR_STMT
 public static final int SUBMOD_DRVR_STMT
 o SUBMOD_DRVR_RSET
 public static final int SUBMOD_DRVR_RSET
 o SUBMOD_DRVR_UTIL
 public static final int SUBMOD_DRVR_UTIL
 o SUBMOD_DBAC_DATA
 public static final int SUBMOD_DBAC_DATA
 o CATEGORY_ALL
 public static final int CATEGORY_ALL
 o USER_OPER
 public static final int USER_OPER
 o PROG_ERROR
 public static final int PROG_ERROR
 o ERROR
 public static final int ERROR
 o WARNING
 public static final int WARNING
 o FUNCTION
 public static final int FUNCTION
 o DEBUG1
 public static final int DEBUG1
 o DEBUG2
 public static final int DEBUG2
 o CATEGORY_TOTAL
 public static final int CATEGORY_TOTAL
 o CategoryName
 public static final String CategoryName[]
 o CATEGORY_LOW_VOL
 public static final int CATEGORY_LOW_VOL
 o CATEGORY_MED_VOL
 public static final int CATEGORY_MED_VOL
 o CATEGORY_HIGH_VOL
 public static final int CATEGORY_HIGH_VOL
 o FIELD_NONE
 public static final int FIELD_NONE
 o FIELD_ALL
 public static final int FIELD_ALL
 o FIELD_TIME
 public static final int FIELD_TIME
 o FIELD_MODULE
 public static final int FIELD_MODULE
 o FIELD_SUBMOD
 public static final int FIELD_SUBMOD
 o FIELD_CATEGORY
 public static final int FIELD_CATEGORY
 o FIELD_CONN
 public static final int FIELD_CONN
 o FIELD_THREAD
 public static final int FIELD_THREAD
 o FIELD_DEFAULT
 public static final int FIELD_DEFAULT
 o TRACE
 public static boolean TRACE

Constructors

 o OracleLog
 public OracleLog()

Methods

 o isEnabled
 public static boolean isEnabled()
Check if logging is enabled.

Returns:
true if logging is enabled, or false if not.
 o 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).
 o getLogWriter
 public static PrintWriter getLogWriter()
Get the logging PrintWriter.

Returns:
the logging PrintWriter, or null if logging is disabled.
 o 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).
 o getLogStream
 public static PrintStream getLogStream()
Get the logging PrintStream.

Returns:
the logging PrintStream, or null if logging is disabled.
 o 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.)
 o 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.
 o 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.
 o 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.
 o print
 public static void print(OracleConnection conn,
                          int module,
                          int category,
                          String message)
 o print
 public static void print(int module,
                          int submodule,
                          int category,
                          String message)
 o print
 public static void print(int module,
                          int category,
                          String message)
 o info
 public static String info()
Obtain information about the current settings.

Returns:
information about the current setting of OracleLog
 o getModuleName
 public static String getModuleName(int module)
Obtain the name of a module.

Parameters:
module module - identifier.
Returns:
the name of the specified module
 o getCategoryName
 public static String getCategoryName(int category)
Obtain the name of a category.

Parameters:
category category - identifier.
Returns:
the name of the specified category
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o test
 public static void test()

All Packages  Class Hierarchy  This Package  Previous  Next  Index