T - The type of the Record instances managed by the
Logger.public class IoLoggerImpl<T> extends Object implements org.refcodes.logger.Logger<T>, org.refcodes.mixin.PrintStreamAccessor.PrintStreamMutator, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamMutator
IoLoggerImpl implements the Logger interface for
providing logging functionality for I/O output (e.g. via System.out
and System.err by default).| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_ERROR_STREAM |
static String |
PROPERTY_OUTPUT_STREAM |
| Constructor and Description |
|---|
IoLoggerImpl()
Constructs a
IoLoggerImpl. |
IoLoggerImpl(org.refcodes.tabular.Header<T> aHeader)
Constructs a
IoLoggerImpl with the given header for logging. |
IoLoggerImpl(org.refcodes.tabular.Header<T> aHeader,
char aSeparator)
Constructs a
IoLoggerImpl with the given header for logging. |
| Modifier and Type | Method and Description |
|---|---|
protected org.refcodes.tabular.Header<T> |
getHeader()
Returns the
Header used by the IoLoggerImpl for usage by
sub-classes. |
void |
log(org.refcodes.tabular.Record<? extends T> aRecord) |
void |
setErrorPrintStream(PrintStream aErrorStream) |
void |
setPrintStream(PrintStream aOutputStream) |
public static final String PROPERTY_ERROR_STREAM
public static final String PROPERTY_OUTPUT_STREAM
public IoLoggerImpl()
IoLoggerImpl.public IoLoggerImpl(org.refcodes.tabular.Header<T> aHeader)
IoLoggerImpl with the given header for logging.aHeader - The header used for logging in the correct format.public IoLoggerImpl(org.refcodes.tabular.Header<T> aHeader, char aSeparator)
IoLoggerImpl with the given header for logging.aHeader - The header used for logging in the correct format.aSeparator - The separator to be used when separating the CSV values
in the log output.public void log(org.refcodes.tabular.Record<? extends T> aRecord) throws org.refcodes.logger.IllegalRecordRuntimeException, org.refcodes.logger.UnexpectedLogRuntimeException
log in interface org.refcodes.logger.Logger<T>org.refcodes.logger.IllegalRecordRuntimeExceptionorg.refcodes.logger.UnexpectedLogRuntimeExceptionpublic void setErrorPrintStream(PrintStream aErrorStream)
setErrorPrintStream in interface org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamMutatorpublic void setPrintStream(PrintStream aOutputStream)
setPrintStream in interface org.refcodes.mixin.PrintStreamAccessor.PrintStreamMutatorprotected org.refcodes.tabular.Header<T> getHeader()
Header used by the IoLoggerImpl for usage by
sub-classes.Header used by the IoLoggerImpl.Copyright © 2017. All rights reserved.