|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Logger
The core logging class. This class does not actually log anything, it is really a broadcaster which formats the
arguments using ArgumentFormatter
and SignatureFormatter
and sends the formatted result to any
associated Listener
s which do the real logging. The purpose of this class is to be the starting point for
logging. This is the class that 99% of most programs should interact with.
A suggestion for implementations of this interface: provide public constructors! While many logging frameworks offer
a static log manager or repository class, there are some domains where creating a Logger dynamically, not based on
any configuration file or external source, is extremely useful.
Severity
Field Summary | |
---|---|
static String |
LINE_SEPARATOR
Line separator character used for formatting multi-line messages. |
Method Summary | |
---|---|
void |
alert(Object... data)
Alert is an information message (like info(Object...) ) but is more significant. |
void |
debug(Object... data)
Debug is an developer or systems information message. |
void |
error(Object... data)
Indicates a generic error occurred. |
void |
fatal(Object... data)
Indicates a error occurred that halts some operation. |
void |
info(Object... data)
Records nominal information about various operations. |
void |
log(Severity severity,
Object... data)
Logs message with a provide Severity . |
void |
panic(Object... data)
Indicates a system error occurred that likely halts the entire application. |
void |
warn(Object... data)
Indicates that something went wrong but the overarching process will continue. |
Field Detail |
---|
static final String LINE_SEPARATOR
Method Detail |
---|
void alert(Object... data)
info(Object...)
) but is more significant. For example the start or
end of a long running process might be an alert so it stands out from the intervening info messages.
Severity.ALERT
void debug(Object... data)
SeverityFilterLogger
.
Severity.DEBUG
void error(Object... data)
fatal(Object...)
message.
Severity.ERROR
void fatal(Object... data)
error(Object...)
but
less critical than panic(Object...)
message. Some applications may have no use for this and may instead
rely solely on error(Object...)
.
Severity.FATAL
void info(Object... data)
Severity.INFO
void log(Severity severity, Object... data)
Severity
. Useful for dynamically determined Severity
messages.
void panic(Object... data)
Severity.PANIC
void warn(Object... data)
Severity.WARN
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |