public class StreamLogger extends Logger
Logger.LogLevel
NUM_LEVELS
Constructor and Description |
---|
StreamLogger() |
Modifier and Type | Method and Description |
---|---|
StreamLogger |
clone() |
void |
debug(java.lang.Object obj)
Log information at the `DEBUG' level
|
void |
error(java.lang.Object obj)
Log information at the `ERROR' level
|
void |
fatal(java.lang.Object obj)
Log information at the `FATAL' level
|
static StreamLogger |
getDefaultLogger() |
Logger.LogLevel |
getLogLevel()
Get the minimum log level that is being recorded
|
java.io.PrintStream |
getStream(Logger.LogLevel level) |
void |
info(java.lang.Object obj)
Log information at the `INFO' level
|
static void |
main(java.lang.String[] args) |
void |
print(java.lang.Object obj)
Print information to the `INFO' log
|
void |
print(java.lang.Object obj,
Logger.LogLevel level)
Print information at the supplied level to the log
|
void |
println(java.lang.Object obj)
Print information to the `INFO' log with trailing newline
|
void |
println(java.lang.Object obj,
Logger.LogLevel level)
Print information at the supplied level to the log, with a trailing newline
|
void |
setDefaultStreams()
Sets streams to defaults (warn, err, fatal use System.err, others use System.out)
|
void |
setLogLevel(Logger.LogLevel level)
Set the minimum log level to record
|
void |
setStream(Logger.LogLevel level,
java.io.PrintStream stream)
Sets the stream for a given log level
|
void |
trace(java.lang.Object obj)
Log information at the `TRACE' level
|
void |
warn(java.lang.Object obj)
Log information at the `WARN' level
|
getSystemLogger, setSystemLogger
public void setDefaultStreams()
public void trace(java.lang.Object obj)
Logger
public void debug(java.lang.Object obj)
Logger
public void info(java.lang.Object obj)
Logger
public void warn(java.lang.Object obj)
Logger
public void error(java.lang.Object obj)
Logger
public void fatal(java.lang.Object obj)
Logger
public void setLogLevel(Logger.LogLevel level)
Logger
setLogLevel
in class Logger
level
- minimum log levelpublic Logger.LogLevel getLogLevel()
Logger
getLogLevel
in class Logger
public java.io.PrintStream getStream(Logger.LogLevel level)
public void setStream(Logger.LogLevel level, java.io.PrintStream stream)
level
- level to modifystream
- output streampublic void print(java.lang.Object obj)
Logger
public void println(java.lang.Object obj)
Logger
public void print(java.lang.Object obj, Logger.LogLevel level)
Logger
public void println(java.lang.Object obj, Logger.LogLevel level)
Logger
public StreamLogger clone() throws java.lang.CloneNotSupportedException
public static StreamLogger getDefaultLogger()
public static void main(java.lang.String[] args)