Class ContentMatchingInterceptor
java.lang.Object
com.atlassian.bamboo.build.logger.interceptors.ContentMatchingInterceptor
- All Implemented Interfaces:
LogInterceptor,Serializable
- Direct Known Subclasses:
StringMatchingInterceptor
This is an abstract base class for interceptors handling matching of log content with support for match age.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionContentMatchingInterceptor(String stringToMatch, boolean matchErrorMessages) -
Method Summary
Modifier and TypeMethodDescriptionintbooleanvoidMethod invoked whenever a new log entry is loggedvoidinterceptError(@NotNull LogEntry logEntry) Method invoked whenever a new error log entry is loggedbooleanisMatchRecentEnough(int maximumAge) Returns true if content has been matched and occurred less than maximumAge lines from the end of log.protected abstract boolean
-
Field Details
-
stringToMatch
-
-
Constructor Details
-
ContentMatchingInterceptor
-
-
Method Details
-
intercept
Description copied from interface:LogInterceptorMethod invoked whenever a new log entry is logged- Specified by:
interceptin interfaceLogInterceptor- Parameters:
logEntry-
-
interceptError
Description copied from interface:LogInterceptorMethod invoked whenever a new error log entry is logged- Specified by:
interceptErrorin interfaceLogInterceptor- Parameters:
logEntry-
-
matches
-
hasMatched
public boolean hasMatched() -
getMatchAge
public int getMatchAge() -
isMatchRecentEnough
public boolean isMatchRecentEnough(int maximumAge) Returns true if content has been matched and occurred less than maximumAge lines from the end of log.- Parameters:
maximumAge- the maximum age (distance in lines between occurrence and end of log) for the match to be recent enough. If set to -1, any match will be valid.
-
getStringToMatch
-