Class LoggingEventConverter
- java.lang.Object
-
- org.hawaiiframework.logging.logback.LoggingEventConverter
-
public class LoggingEventConverter extends Object
Converts logging events to a readable log format.- Since:
- 2.0.0
- Author:
- Rutger Lubbers
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
LOG_LINE_FORMAT
The log line format.
-
Constructor Summary
Constructors Constructor Description LoggingEventConverter()
Constructor for normal usage.LoggingEventConverter(IThrowableProxyConverter iThrowableProxyConverter)
Constructor for unit testing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
convert(ch.qos.logback.classic.spi.LoggingEvent event)
Converts the LoggingEvent to a loggable string.String
getTimestamp(Date timestamp)
Public method to check whether the timestamp is correct for the last week of december.
-
-
-
Field Detail
-
LOG_LINE_FORMAT
protected static final String LOG_LINE_FORMAT
The log line format.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LoggingEventConverter
public LoggingEventConverter()
Constructor for normal usage.
-
LoggingEventConverter
public LoggingEventConverter(IThrowableProxyConverter iThrowableProxyConverter)
Constructor for unit testing.- Parameters:
iThrowableProxyConverter
- the converter to be used (e.g. a mock).
-
-
Method Detail
-
convert
public String convert(ch.qos.logback.classic.spi.LoggingEvent event)
Converts the LoggingEvent to a loggable string.- Parameters:
event
- the non-null event.- Returns:
- a nicely formatted String.
-
-