logahawk.listeners
Interface LogMetaProvider
- All Known Implementing Classes:
- DefaultLogMetaProvider, ThreadLogMetaProvider
public interface LogMetaProvider
Controls the creation LogMeta
instances. This class is designed to the responsibility of creating the LogMeta
instances that a Logger
needs to pass to the Listener
s. Example usages:
- Adding extra data to the LogMeta
instances, such as the thread name that initiated the log request. The
ThreadLogMetaProvider
provides this functionality.
- Passing control information to the Listener
s that allows them to better process the log messages. (This is
most useful when there are multiple LogMetaProvider
s of different types in play, and the Listener
s
need to be able to determine what kinds of messages they are getting and what to do with them.
- If an application is altering its perception of the current time, this allows easily changing the timestamps used
in a log. (This usage is very application independent, some applications may want "real" timestamps even if the
system believes time is different, and some applications may wish their logs to be in sync to verify that events are
occurring when they are expected relative to some well-defined epoch.) The DefaultLogMetaProvider
provides
this functionality.
create
LogMeta create(Severity severity)