Package org.refcodes.logger
Interface Logger<T>
-
- Type Parameters:
T
- The type of theRecord
instances managed by theLogger
.
- All Known Subinterfaces:
QueryLogger<T>
,TrimLogger<T>
- All Known Implementing Classes:
CompositeLoggerImpl
,CompositeQueryLoggerImpl
,CompositeTrimLoggerImpl
,PartedLoggerImpl
,PartedQueryLoggerImpl
,PartedTrimLoggerImpl
,SystemLogger
public interface Logger<T>
TheLogger
interface defines those methods required for an atomic (sub-)logger to implement. Specialized loggers may make use ofLogger
implementations; for example theRuntimeLogger
can be configured to log to a console, a NoSQL database or a file depending on how it is configured (on whichLogger
implementation it is told to use).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
log(org.refcodes.tabular.Record<? extends T> aRecord)
Logs aRecord
.default void
printSeparator()
Prints a separator line in case the underlyingLogger
supports the such.
-
-
-
Method Detail
-
log
void log(org.refcodes.tabular.Record<? extends T> aRecord) throws IllegalRecordRuntimeException, UnexpectedLogRuntimeException
Logs aRecord
. The targeted data sink for theRecord
instances (where them are physically stored) depends on the implementation of theLogger
. It can be a console, a file, a stream or a database.- Parameters:
aRecord
- TheRecord
to be logged.- Throws:
IllegalRecordRuntimeException
- Thrown in case the record cannot be logged as a specific implementation might expect some dedicatedColumn
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.
-
printSeparator
default void printSeparator()
Prints a separator line in case the underlyingLogger
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.
-
-