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.ErrorStreamAccessor.ErrorStreamMutator, org.refcodes.mixin.PropertiesAccessor.PropertiesMutator
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 |
setErrorStream(PrintStream aErrorStream) |
void |
setPrintStream(PrintStream aOutputStream) |
void |
setProperties(Properties aProperties) |
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.IllegalRecordRuntimeException
org.refcodes.logger.UnexpectedLogRuntimeException
public void setErrorStream(PrintStream aErrorStream)
setErrorStream
in interface org.refcodes.mixin.ErrorStreamAccessor.ErrorStreamMutator
public void setPrintStream(PrintStream aOutputStream)
setPrintStream
in interface org.refcodes.mixin.PrintStreamAccessor.PrintStreamMutator
public void setProperties(Properties aProperties)
setProperties
in interface org.refcodes.mixin.PropertiesAccessor.PropertiesMutator
protected org.refcodes.tabular.Header<T> getHeader()
Header
used by the IoLoggerImpl
for usage by
sub-classes.Header
used by the IoLoggerImpl
.Copyright © 2016. All rights reserved.