public abstract class AbstractLogChecker extends Object implements LogChecker
| Modifier and Type | Field and Description |
|---|---|
protected static Pattern |
STACKTRACE_COLLAPSED_INFORMATION_REGEX_PATTERN |
protected static Pattern |
STACKTRACE_EXCEPTION_CAUSE_REGEX_PATTERN |
protected static Pattern |
STACKTRACE_FILTERED_ENTRY_REGEX_PATTERN |
protected static Pattern |
STACKTRACE_METHOD_CALL_REGEX_PATTERN |
| Constructor and Description |
|---|
AbstractLogChecker() |
| Modifier and Type | Method and Description |
|---|---|
protected <T> boolean |
assertAndSaveError(T checkedValue,
org.hamcrest.Matcher<T> comparison,
String failureMessagePrefix,
StringBuilder errorCatcher) |
abstract void |
check(String logMessage)
The method should check the log according to the rules defined in the implementation.
|
protected List<String> |
getMessageLinesFromLogLines(List<String> initialLogLines)
Extracts the message part of the log.
|
protected List<String> |
getStacktraceLinesFromLogLines(List<String> initialLogLines)
Extracts the stack trace from the log, ignoring any other information that could be there.
|
protected List<String> |
splitLines(String wholeMessage) |
protected static final Pattern STACKTRACE_METHOD_CALL_REGEX_PATTERN
protected static final Pattern STACKTRACE_FILTERED_ENTRY_REGEX_PATTERN
protected static final Pattern STACKTRACE_EXCEPTION_CAUSE_REGEX_PATTERN
protected static final Pattern STACKTRACE_COLLAPSED_INFORMATION_REGEX_PATTERN
public abstract void check(String logMessage)
LogCheckercheck in interface LogCheckerlogMessage - the log message to checkprotected List<String> getMessageLinesFromLogLines(List<String> initialLogLines)
protected List<String> getStacktraceLinesFromLogLines(List<String> initialLogLines)
protected <T> boolean assertAndSaveError(T checkedValue,
org.hamcrest.Matcher<T> comparison,
String failureMessagePrefix,
StringBuilder errorCatcher)
Copyright © 2003–2024 MuleSoft, Inc.. All rights reserved.