logahawk
Class AbstractLogger

java.lang.Object
  extended by logahawk.AbstractLogger
All Implemented Interfaces:
Logger
Direct Known Subclasses:
BufferedLogger, ProxyLogger, SimpleLogger

public abstract class AbstractLogger
extends Object
implements Logger

An implementation of Logger that redirects all the Severity specific methods to the general Logger.log(Severity, Object...) method.


Field Summary
 
Fields inherited from interface logahawk.Logger
LINE_SEPARATOR
 
Constructor Summary
AbstractLogger()
           
 
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.
 void info(Object... data)
          Records nominal information about various operations.
abstract  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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractLogger

public AbstractLogger()
Method Detail

alert

public void alert(Object... data)
Description copied from interface: Logger
Alert is an information message (like Logger.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.

Specified by:
alert in interface Logger
See Also:
Severity.ALERT

debug

public void debug(Object... data)
Description copied from interface: Logger
Debug is an developer or systems information message. It is intended to be used by those who understand or have access to the internals of the application. Debug messages may be voluminous and so stable systems may choose to filter these out. (See SeverityFilterLogger.

Specified by:
debug in interface Logger
See Also:
Severity.DEBUG

error

public void error(Object... data)
Description copied from interface: Logger
Indicates a generic error occurred. This does not imply whether the process stopped or not, that distinction is often better served by the Logger.fatal(Object...) message.

Specified by:
error in interface Logger
See Also:
Severity.ERROR

fatal

public void fatal(Object... data)
Description copied from interface: Logger
Indicates a error occurred that halts some operation. This is more severe than an Logger.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...).

Specified by:
fatal in interface Logger
See Also:
Severity.FATAL

info

public void info(Object... data)
Description copied from interface: Logger
Records nominal information about various operations. This should be the most common method called.

Specified by:
info in interface Logger
See Also:
Severity.INFO

log

public abstract void log(Severity severity,
                         Object... data)
Description copied from interface: Logger
Logs message with a provide Severity. Useful for dynamically determined Severity messages.

Specified by:
log in interface Logger

panic

public void panic(Object... data)
Description copied from interface: Logger
Indicates a system error occurred that likely halts the entire application. This is the highest severity message, and it is likely that the application can no longer perform basic operations. Examples would be loss of all database connection, running out of temporary space (in an application that depends on it), unable to load expected classes, permission errors to core data, severe data corruption, etc. This message is akin to panic in interface Logger
See Also:
Severity.PANIC

warn

public void warn(Object... data)
Description copied from interface: Logger
Indicates that something went wrong but the overarching process will continue. This should be used when an error state is detected but can be recovered from.

Specified by:
warn in interface Logger
See Also:
Severity.WARN