public class LogStream extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEBUG
Log level for printing debug messages.
|
static int |
ERROR
Log level for printing all errors.
|
static int |
FATAL
Log level for printing only fatal errors.
|
static int |
INFO
Log level for printing info messages.
|
static int |
NOTHING
Log level for printing nothing.
|
static int |
TRACE
Log level for printing trace messages.
|
static int |
WARN
Log level for printing warnings.
|
| Constructor and Description |
|---|
LogStream(PrintStream out)
Create a new log stream.
|
LogStream(PrintStream out,
int level)
Create a new log stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
debug(String msg)
Emit a debug message.
|
void |
debugf(String msg,
Object... args)
Emit a formatted debug message.
|
void |
error(String msg)
Emit a normal error message.
|
void |
errorf(String msg,
Object... args)
Emit a formatted normal error message.
|
void |
fatal(String msg)
Emit a fatal error message.
|
void |
fatalf(String msg,
Object... args)
Emit a formatted fatal error message.
|
void |
info(String msg)
Emit an info message.
|
void |
infof(String msg,
Object... args)
Emit a formatted info message.
|
void |
louder()
Increment the verbosity of the stream.
|
void |
louder(int amt)
Increase the verbosity of the stream by an amount.
|
void |
message(int lvl,
String msg)
Print a message at a given verbosity level.
|
void |
messagef(int lvl,
String msg,
Object... args)
Print a formatted message at a given verbosity level.
|
void |
print(String msg)
Print a message that will always be visible.
|
void |
printf(String msg,
Object... args)
Print a formatted message that will always be visible.
|
void |
quieter()
Decrement the verbosity of the stream.
|
void |
quieter(int amt)
Decrease the verbosity of the stream by an amount.
|
void |
trace(String msg)
Emit a tracing message.
|
void |
tracef(String msg,
Object... args)
Emit a formatted tracing message.
|
int |
verbosity()
Get the verbosity of the stream.
|
void |
verbosity(int verb)
Set the verbosity of the stream.
|
void |
warn(String msg)
Emit a warning message.
|
void |
warnf(String msg,
Object... args)
Emit a formatted warning message.
|
public static final int NOTHING
public static final int FATAL
public static final int ERROR
public static final int WARN
public static final int INFO
public static final int DEBUG
public static final int TRACE
public LogStream(PrintStream out)
out - The output stream to place things into.public LogStream(PrintStream out, int level)
out - The output stream to place things into.level - The verbosity level. Use the constants in this class for the
values.public int verbosity()
public void verbosity(int verb)
verb - The verbosity of the stream.public void louder()
public void louder(int amt)
amt - The amount to increase the verbosity by.public void quieter()
public void quieter(int amt)
amt - The amount to decrease the verbosity by.public void print(String msg)
msg - The message to print.public void printf(String msg, Object... args)
msg - The format string for the message to print.args - The arguments to the format string.public void message(int lvl,
String msg)
lvl - The verbosity level.msg - The message to print.public void messagef(int lvl,
String msg,
Object... args)
lvl - The verbosity level.msg - The message to print.args - The arguments to the message.public void fatal(String msg)
msg - The message to emit.public void fatalf(String msg, Object... args)
msg - The message to emit.args - The arguments to the message.public void error(String msg)
msg - The message to emit.public void errorf(String msg, Object... args)
msg - The message to emit.args - The arguments to the message.public void warn(String msg)
msg - The message to emit.public void warnf(String msg, Object... args)
msg - The message to emit.args - The arguments to the message.public void info(String msg)
msg - The message to emit.public void infof(String msg, Object... args)
msg - The message to emit.args - The arguments to the message.public void debug(String msg)
msg - The message to emit.public void debugf(String msg, Object... args)
msg - The message to emit.args - The arguments to the message.public void trace(String msg)
msg - The message to emit.Copyright © 2020. All rights reserved.