Class LogInterceptorStack
java.lang.Object
com.atlassian.bamboo.build.logger.LogInterceptorStack
- All Implemented Interfaces:
LogInterceptor
,Serializable
This class handles attaching/detaching of interceptors and the actual interception forwarding.
It contains stack for job and task level.
Task level interceptors are cleaned after task completion, but job level interceptors are never cleaned up.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(@NotNull LogInterceptor interceptor) Adds a new task interceptor to stackvoid
addForJob
(@NotNull LogInterceptor interceptor) Adds a new job interceptor to stackvoid
clear()
Removes all task interceptors from stack.void
Removes all job interceptors.void
Method invoked whenever a new log entry is loggedvoid
interceptError
(@NotNull LogEntry logEntry) Method invoked whenever a new error log entry is loggedvoid
remove
(@Nullable LogInterceptor interceptor) Removes a task interceptor from stackvoid
removeFromJob
(@Nullable LogInterceptor interceptor) Removes a job interceptor from stack
-
Constructor Details
-
LogInterceptorStack
public LogInterceptorStack()
-
-
Method Details
-
clear
public void clear()Removes all task interceptors from stack. -
clearFromJob
public void clearFromJob()Removes all job interceptors. -
add
Adds a new task interceptor to stack- Parameters:
interceptor
- the interceptor to add
-
addForJob
Adds a new job interceptor to stack- Parameters:
interceptor
- the interceptor to add
-
remove
Removes a task interceptor from stack- Parameters:
interceptor
- the interceptor to remove
-
removeFromJob
Removes a job interceptor from stack- Parameters:
interceptor
- the interceptor to remove
-
intercept
Description copied from interface:LogInterceptor
Method invoked whenever a new log entry is logged- Specified by:
intercept
in interfaceLogInterceptor
-
interceptError
Description copied from interface:LogInterceptor
Method invoked whenever a new error log entry is logged- Specified by:
interceptError
in interfaceLogInterceptor
-
listForJob
-