All Packages Class Hierarchy This Package Previous Next Index
Class com.ups.xmlsdk.util.logging.Logger
java.lang.Object
|
+----com.ups.xmlsdk.util.logging.Logger
- public class Logger
- extends Object
- implements LogDefs, LogContextFactory
General Logging interface. There is one interface per facility so
the user does not have to specify the facility string.
The user can also specify a context factory which looks up user context
information using the calling thread as a key. This allows use of the
two shorthand log() methods that do not have an explicit context arg.
The default factory prints the process and thread IDs.
-
Logger(String, Logger)
-
-
audit(String)
-
-
close()
-
-
debug(String)
-
-
error(String)
-
-
flush()
-
-
getContext()
-
-
getFacility()
-
-
getFormatter()
-
-
getLevel()
-
-
log(int, String)
-
-
log(int, String, long)
-
-
log(LogContext, String, int, String, long)
-
-
log(String)
-
-
parseLevel(String)
- Parse a logging level represented as a string.
-
setContextFactory(LogContextFactory)
-
-
setFacility(String)
-
-
setFormatter(LogFormatter)
-
-
setLevel(int)
-
-
trace(String)
-
Logger
public Logger(String facility,
Logger delegate)
audit
public final void audit(String msg)
close
public void close() throws IOException
debug
public final void debug(String msg)
error
public final void error(String msg)
flush
public void flush() throws IOException
getContext
public LogContext getContext()
getFacility
public String getFacility()
getFormatter
public LogFormatter getFormatter()
getLevel
public int getLevel()
log
public final void log(int pri,
String msg)
log
public final void log(int pri,
String msg,
long code)
log
public int log(LogContext context,
String facility,
int priority,
String msg,
long code) throws LogException
log
public final void log(String msg)
parseLevel
public static final int parseLevel(String s)
- Parse a logging level represented as a string. Return -1 if a
valid level cannot be parsed.
setContextFactory
public void setContextFactory(LogContextFactory contextFactory)
setFacility
public void setFacility(String facility)
setFormatter
public void setFormatter(LogFormatter formatter)
setLevel
public void setLevel(int level)
trace
public final void trace(String msg)
All Packages Class Hierarchy This Package Previous Next Index