Package com.pnfsoftware.jeb.util.logging
Class Sink<T>
java.lang.Object
com.pnfsoftware.jeb.util.logging.Sink<T>
- Type Parameters:
T- type of output
- Direct Known Subclasses:
BufferSink,StreamSink
An abstract output sink receiving the logs. Refer to the subclasses.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet this sink's minimum log level.Get the underlying output object.inthashCode()booleanDetermine whether this sink prefixes messages with timestamps.voidsetLogLevel(int logLevel) Set this sink's minimum log level.voidsetPrefixWithTimestamp(boolean prefixWithTimestamp) Set whether this sink prefixes messages with timestamps.toString()
-
Field Details
-
output
-
-
Constructor Details
-
Sink
-
-
Method Details
-
getOutput
Get the underlying output object.- Returns:
- the output object
-
getLogLevel
public int getLogLevel()Get this sink's minimum log level.- Returns:
- the minimum level accepted by this sink
-
setLogLevel
public void setLogLevel(int logLevel) Set this sink's minimum log level.- Parameters:
logLevel- minimum level accepted by this sink
-
isPrefixWithTimestamp
public boolean isPrefixWithTimestamp()Determine whether this sink prefixes messages with timestamps.- Returns:
- true if timestamp prefixes are enabled
-
setPrefixWithTimestamp
public void setPrefixWithTimestamp(boolean prefixWithTimestamp) Set whether this sink prefixes messages with timestamps.- Parameters:
prefixWithTimestamp- true to prefix messages with timestamps
-
hashCode
public int hashCode() -
equals
-
toString
-