|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacorb.util.Debug
Central anchor class to retrieve loggers, or to log messages directly. This class acts as a facde and shields clients from the actual log mechanisms. In its current state of evolution, it returns Apache Avalong loggers, which permit still other log backends, such as Apache logkit, which is the current default. The actual creation of logger instances based on configuration parameters is done in Environment, however.
Constructor Summary | |
Debug()
|
Method Summary | |
static org.apache.avalon.framework.logger.Logger |
getNamedLogger(java.lang.String name)
Convenience method. |
static org.apache.avalon.framework.logger.Logger |
getNamedRootLogger(java.lang.String name)
Convenience method. |
static void |
initialize()
|
static boolean |
isDebugEnabled()
isDebugEnabled allows fast efficient checking of whether
debug is enabled. |
static void |
output(int msg_level,
java.lang.String msg)
Deprecated. As this method can be inefficient for debug statements use isDebugEnabled and
output(String) methods in the form:
if (Debug.isDebugEnabled ())
{
Debug.output (" |
static void |
output(int msg_level,
java.lang.String name,
byte[] bs)
Deprecated. As this method can be inefficient for debug statements use isDebugEnabled and
output(String,byte[]) methods
in the form:
if (Debug.isDebugEnabled ())
{
Debug.output (" |
static void |
output(int msg_level,
java.lang.String name,
byte[] bs,
int len)
Output a buffer in hex format to System.out. |
static void |
output(int msg_level,
java.lang.String name,
byte[] bs,
int start,
int len)
Output a buffer in hex format to System.out. |
static void |
output(int msg_level,
java.lang.Throwable e)
convenience method to output stack traces |
static void |
output(java.lang.String msg)
output the following message. |
static void |
output(java.lang.String name,
byte[] bs)
output a buffer in hex format. |
static char |
toAscii(byte b)
|
static java.lang.String |
toHex(byte b)
toHex converts a byte into a readable string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Debug()
Method Detail |
public static final void initialize()
public static boolean isDebugEnabled()
isDebugEnabled
allows fast efficient checking of whether
debug is enabled. This ensures any inefficient String concatenations
can be done inside an if statement. @see output(int,String) output(int,String)
boolean
valuepublic static void output(java.lang.String msg)
output
the following message. Useful in conjunction with canOutput or
isDebugEnabled.
public static final void output(int msg_level, java.lang.String msg)
isDebugEnabled
and
output(String)
methods in the form:
if (Debug.isDebugEnabled ())
{
Debug.output ("
output
a message.
msg_level
- an int
valuemsg
- a String
valuepublic static void output(int msg_level, java.lang.String name, byte[] bs)
isDebugEnabled
and
output(String,byte[])
methods
in the form:
if (Debug.isDebugEnabled ())
{
Debug.output ("
public static void output(java.lang.String name, byte[] bs)
output
a buffer in hex format. Useful in conjunction with
canOutput or isDebugEnabled. Note that output synchronizes the calling
threads in order to avoid garbled debug output
bs
- a byte[]
valuepublic static void output(int msg_level, java.lang.String name, byte[] bs, int len)
public static void output(int msg_level, java.lang.String name, byte[] bs, int start, int len)
public static final java.lang.String toHex(byte b)
toHex
converts a byte into a readable string.
b
- a byte
value
String
valuepublic static final char toAscii(byte b)
public static final void output(int msg_level, java.lang.Throwable e)
public static org.apache.avalon.framework.logger.Logger getNamedLogger(java.lang.String name)
public static org.apache.avalon.framework.logger.Logger getNamedRootLogger(java.lang.String name)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |