|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sun.ebxml.registry.util.Log
Error and trace log implementation. A single log is implementated per process (e.g. Virtual Machine). This implementation uses a file based model. A separate file for each log category is supported.
| Field Summary | |
static int |
ERROR
|
static int |
FIRST_CATEGORY
Log categories are used to differentiate messages into separate files. |
static int |
INFO
|
static int |
LAST_CATEGORY
|
static int |
TRACE
|
static int |
WARN
|
| Method Summary | |
static void |
initialize(java.io.PrintWriter errorOut,
java.io.PrintWriter traceOut,
int level)
Initialize log context. |
static void |
initialize(java.lang.String logFileName,
int level)
Initialize log context. |
static void |
initialize(java.lang.String errorFileName,
java.lang.String traceFileName,
int level,
boolean append)
Initialize log context. |
static void |
print(int category,
int msgLevel,
java.lang.String msg)
Only log msg if msgLevel is less than current logLevel or if ERROR. |
static void |
printBuffer(int category,
int msgLevel,
java.util.Collection buffer,
java.lang.String vName)
Convenience utility for printing a buffer of objects. |
static void |
printStackTrace(java.lang.Throwable t)
Convenience utility for printing stack trace to error log. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int FIRST_CATEGORY
public static final int ERROR
public static final int WARN
public static final int INFO
public static final int TRACE
public static final int LAST_CATEGORY
| Method Detail |
public static void print(int category,
int msgLevel,
java.lang.String msg)
category - set to INFO, ERROR, WARN, TRACE.msg - text too writemsgLevel - a number from 0 to 10. Give rare important messages
a low number and give numerous, not important messages a higher number.
public static void printBuffer(int category,
int msgLevel,
java.util.Collection buffer,
java.lang.String vName)
public static void printStackTrace(java.lang.Throwable t)
public static void initialize(java.lang.String logFileName,
int level)
logFileName - basename for error and trace logs.level - verbosity level
public static void initialize(java.lang.String errorFileName,
java.lang.String traceFileName,
int level,
boolean append)
errorFileName - use stderr if errorFileName is null.traceFileName - use stdout if traceFileName is null.level - verbosity levelappend - if true then append to end of file, otherwise overwrite
public static void initialize(java.io.PrintWriter errorOut,
java.io.PrintWriter traceOut,
int level)
errorOut - writer for stack trace and errortraceOut - use stdout if traceFileName is null.level - verbosity level
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||