|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--inria.util.Logger
This class provides a flexible log mechanism. Some of the log functions can be redirected to the application. The provided log functions include:
Field Summary | |
static boolean |
append
|
static boolean |
debug
|
protected static int |
errLogFileMaxSize
|
static boolean |
trace
|
protected static java.lang.String |
traceFile
|
Constructor Summary | |
Logger()
|
Method Summary | |
static void |
busy(int percent)
|
static void |
debug(java.lang.Object o,
java.lang.String s)
prints a message to stdout if the debug flag is true. |
static void |
debug(java.lang.String s)
prints a message to stdout if the debug flag is true. |
static void |
dump(byte[] data,
int offset,
int len)
|
static void |
dump(java.lang.Object o,
byte[] data,
int offset,
int len)
|
static void |
dump(java.io.PrintStream out,
byte[] data,
int offset,
int len)
unconditional dump. |
static void |
error(java.lang.Object o,
java.lang.String s)
prints a trace message. |
static void |
error(java.lang.Object o,
java.lang.String s,
java.lang.Exception e)
|
static void |
error(java.lang.String s)
|
static void |
error(java.lang.String s,
java.lang.Exception e)
|
static void |
fatal(java.lang.Object o,
java.lang.String s)
|
static void |
fatal(java.lang.String s)
|
static java.lang.String |
getTraceFile()
|
static void |
redirect(LoggerInterface c)
redirects trace, error and status messages to the given interface. |
static void |
setDebug(boolean f)
turns on/off the debug mode. |
static void |
setErrorLogFile(java.lang.String errLogFile)
sets the errlog file. |
static void |
setTrace(boolean f)
turns on/off the trace mode. |
static void |
setTraceFile(java.lang.String name)
sets the trace file. |
static java.lang.String |
shortClassname(java.lang.Object o)
|
static void |
stringDump(byte[] data,
int offset,
int len)
|
static void |
stringDump(java.io.PrintStream out,
byte[] data,
int offset,
int len)
|
static void |
trace(java.lang.Object o,
java.lang.String s)
prints a message to stdout or the redirected logger if the trace flag is true. |
static void |
trace(java.lang.String s)
prints a message to stdout or the redirected logger if the trace flag is true. |
static void |
warning(java.lang.Object o,
java.lang.String s)
|
static void |
warning(java.lang.String s)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean debug
public static boolean trace
public static boolean append
protected static int errLogFileMaxSize
protected static java.lang.String traceFile
Constructor Detail |
public Logger()
Method Detail |
public static void redirect(LoggerInterface c)
c
- the console.public static void setDebug(boolean f)
f
- the debug flag.public static void setTrace(boolean f)
f
- the trace flag.public static void setErrorLogFile(java.lang.String errLogFile)
errLogFile
- the error log file name.public static void setTraceFile(java.lang.String name)
name
- the trace file name.public static java.lang.String getTraceFile()
public static void error(java.lang.Object o, java.lang.String s)
o
- the object from that the message is issued.s
- the message to print.public static void error(java.lang.String s)
public static void error(java.lang.Object o, java.lang.String s, java.lang.Exception e)
public static void error(java.lang.String s, java.lang.Exception e)
public static void warning(java.lang.Object o, java.lang.String s)
public static void warning(java.lang.String s)
public static void debug(java.lang.String s)
s
- the message to print.public static void debug(java.lang.Object o, java.lang.String s)
o
- the object from that the message is issued.s
- the message to print.public static void trace(java.lang.String s)
s
- the message to print.public static void trace(java.lang.Object o, java.lang.String s)
o
- the object from that the message is issued.s
- the message to print.public static java.lang.String shortClassname(java.lang.Object o)
public static void fatal(java.lang.Object o, java.lang.String s)
public static void fatal(java.lang.String s)
public static void dump(java.lang.Object o, byte[] data, int offset, int len)
public static void dump(byte[] data, int offset, int len)
public static void stringDump(byte[] data, int offset, int len)
public static void dump(java.io.PrintStream out, byte[] data, int offset, int len)
public static void stringDump(java.io.PrintStream out, byte[] data, int offset, int len)
public static void busy(int percent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaTM Reliable MulticastTM Service version 1.1
Copyright (c) 2001, Sun Microsystems Laboratories, All rights reserved.