|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlogahawk.AbstractContainer<Logger>
logahawk.MultiLogger
@ThreadSafe public class MultiLogger
A Logger implementation that forwards all logging messages to other Logger instances.
This class is intended to be used in situations where you have Loggers with different formatters. For
example, one Logger might be intended to be viewed by non-technical users and so it removes any Exception arguments, while another Logger keeps the Exceptions and writes them to the log file for
use by developers.
| Field Summary |
|---|
| Fields inherited from class logahawk.AbstractContainer |
|---|
items |
| Fields inherited from interface logahawk.Logger |
|---|
LINE_SEPARATOR |
| Constructor Summary | |
|---|---|
MultiLogger()
|
|
MultiLogger(Collection<Logger> c)
|
|
| Method Summary | |
|---|---|
void |
alert(Object... data)
Alert is an information message (like Logger.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. |
List<Logger> |
getLoggers()
|
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. |
| Methods inherited from class logahawk.AbstractContainer |
|---|
add, addAll, clear |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiLogger()
public MultiLogger(Collection<Logger> c)
| Method Detail |
|---|
public void alert(Object... data)
LoggerLogger.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.
alert in interface LoggerSeverity.ALERTpublic void debug(Object... data)
LoggerSeverityFilterLogger.
debug in interface LoggerSeverity.DEBUGpublic void error(Object... data)
LoggerLogger.fatal(Object...) message.
error in interface LoggerSeverity.ERRORpublic void fatal(Object... data)
LoggerLogger.error(Object...) but
less critical than Logger.panic(Object...) message. Some applications may have no use for this and may instead
rely solely on Logger.error(Object...).
fatal in interface LoggerSeverity.FATALpublic void info(Object... data)
Logger
info in interface LoggerSeverity.INFO
public void log(Severity severity,
Object... data)
LoggerSeverity. Useful for dynamically determined Severity messages.
log in interface Loggerpublic void panic(Object... data)
LoggerLoggerSeverity.PANICpublic void warn(Object... data)
Logger
warn in interface LoggerSeverity.WARNpublic List<Logger> getLoggers()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||