public final class SimpleTailSplitter extends Object
Constructor and Description |
---|
SimpleTailSplitter() |
Modifier and Type | Method and Description |
---|---|
Date |
determineDate(List<String> raw)
Read the message and find the date when the message was submitted.
|
ExceptionDescriptor |
determineException(List<String> raw)
Read the message and try to identify an exception stack trace within.
|
String |
determineLogger(List<String> line)
Messages in the log can contain information as to what logged them.
|
MessageSeverity |
determineSeverity(List<String> raw)
Read the message and try to find its severity.
|
MessageType |
determineType(List<String> raw)
Read the message and try to find its type.
|
boolean |
isStartingLine(String line)
Whether or not this particular line from the log starts a new log
message.
|
String |
stripOfMetadata(String line)
Take a line from the log and attempt to strip it of metadata, such as
severity, type and date.
|
public Date determineDate(List<String> raw)
TailSplitter
raw
- Raw, untreated lines of the message.public String determineLogger(List<String> line)
TailSplitter
line
- Raw, untreated lines of the message.public MessageSeverity determineSeverity(List<String> raw)
TailSplitter
raw
- Raw, untreated lines of the message.MessageSeverity.UNKNOWN
otherwise.public MessageType determineType(List<String> raw)
TailSplitter
raw
- Raw, untreated lines of the message.MessageType.LOG
if
undetermined.public boolean isStartingLine(String line)
TailSplitter
Message
being
produced and possibly stored.line
- Line from the log.public String stripOfMetadata(String line)
TailSplitter
line
- Line from the log.public ExceptionDescriptor determineException(List<String> raw)
TailSplitter
determineException
in interface TailSplitter
raw
- Raw, untreated lines of the message.Copyright © 2015. All rights reserved.