* @return the event, or <code>null</code> if the event didn't match our regex, wasn't of the minimum severity
* or couldn't be parsed successfully
*/
protected Event convertLine(String syslogMessage) {
Event event = null;
try {
if (this.parserRegex != null) {
event = convertLineParserRegEx(syslogMessage);
} else {
event = convertLineDefaultFormat(syslogMessage); // no parser regex, use best attempt with our default format
}
// if we could not parse the event, just use the entire log as the event detail
if (event == null) {
event = convertAnyLine(syslogMessage);
}
// filter the event if it doesn't meet our minimum severity requirement or it doesn't match the includes regex
if (event != null) {
if (this.minimumEventSeverity != null
&& !event.getSeverity().isAtLeastAsSevereAs(this.minimumEventSeverity)) {
if (log.isTraceEnabled()) {
log.trace("event is not at minimum severity: " + event);
}
event = null;
} else if (this.includesPattern != null && !this.includesPattern.matcher(event.getDetail()).matches()) {
if (log.isTraceEnabled()) {
log.trace("event does not match includes pattern [" + this.includesPattern + "]: " + event);
}
event = null;
}