T
- The type of the Record
instances managed by the
Logger
.public interface Logger<T>
Logger
interface defines those methods required for an atomic
(sub-)logger to implement. Specialized loggers may make use of Logger
implementations; for example the RuntimeLogger
can be configured to
log to a console, a NoSQL database or a file depending on how it is
configured (on which Logger
implementation it is told to use).Modifier and Type | Method and Description |
---|---|
void |
log(org.refcodes.tabular.Record<? extends T> aRecord)
Logs a
Record . |
default void |
printSeparator()
Prints a separator line in case the underlying
Logger supports
the such. |
void log(org.refcodes.tabular.Record<? extends T> aRecord) throws IllegalRecordRuntimeException, UnexpectedLogRuntimeException
Record
. The targeted data sink for the Record
instances (where them are physically stored) depends on the
implementation of the Logger
. It can be a console, a file, a
stream or a database.aRecord
- The Record
to be logged.IllegalRecordRuntimeException
- Thrown in case the record cannot be
logged as a specific implementation might expect some dedicated
Column
instances to be contained in the provided Record.UnexpectedLogRuntimeException
- Thrown in case some other problems
regarding logging occurred, e.g. the data sink (physical system
where to log to) experiences problems.default void printSeparator()
Logger
supports
the such. A separator line may be printed just as of beautifying purposes
and does not belong to the actual log's data. Therefore this method may
just do nothing, depending on the implementing class.Copyright © 2018. All rights reserved.