com.atlassian.bamboo.build.logger.interceptors
Class ErrorMemorisingInterceptor

java.lang.Object
  extended by com.atlassian.bamboo.build.logger.interceptors.ErrorMemorisingInterceptor
All Implemented Interfaces:
LogInterceptor, java.io.Serializable

public class ErrorMemorisingInterceptor
extends java.lang.Object
implements LogInterceptor

Interceptor that remembers all the errors being reported in the build log.

See Also:
Serialized Form

Constructor Summary
ErrorMemorisingInterceptor()
          Deprecated. Collection created with this constructor will become bounded to $SystemProperty.LOG_LINES_FOR_NOTIFICATIONS most recent lines. If you want to store large amounts of data in this interceptor (and you're aware that it may cause out of memory errors on your instance and agents, use the bounded variant of the constructor. Otherwise, leave your code as it is. This constructor will not be removed.
ErrorMemorisingInterceptor(int limit)
          Creates interceptor that stores the most recent "limit" lines it receives.
 
Method Summary
 java.util.List<java.lang.String> getErrorStringList()
           
 void intercept(LogEntry logEntry)
          Method invoked whenever a new log entry is logged
 void interceptError(LogEntry logEntry)
          Method invoked whenever a new error log entry is logged
static ErrorMemorisingInterceptor newInterceptor()
          Creates interceptor that stores the most recent $SystemProperty.LOG_LINES_FOR_NOTIFICATIONS lines it receives.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorMemorisingInterceptor

@Deprecated
public ErrorMemorisingInterceptor()
Deprecated. Collection created with this constructor will become bounded to $SystemProperty.LOG_LINES_FOR_NOTIFICATIONS most recent lines. If you want to store large amounts of data in this interceptor (and you're aware that it may cause out of memory errors on your instance and agents, use the bounded variant of the constructor. Otherwise, leave your code as it is. This constructor will not be removed.

Creates an unbounded interceptor that stores all data it receives.


ErrorMemorisingInterceptor

public ErrorMemorisingInterceptor(int limit)
Creates interceptor that stores the most recent "limit" lines it receives.

Method Detail

newInterceptor

public static ErrorMemorisingInterceptor newInterceptor()
Creates interceptor that stores the most recent $SystemProperty.LOG_LINES_FOR_NOTIFICATIONS lines it receives.


intercept

public void intercept(@NotNull
                      LogEntry logEntry)
Description copied from interface: LogInterceptor
Method invoked whenever a new log entry is logged

Specified by:
intercept in interface LogInterceptor

interceptError

public void interceptError(@NotNull
                           LogEntry logEntry)
Description copied from interface: LogInterceptor
Method invoked whenever a new error log entry is logged

Specified by:
interceptError in interface LogInterceptor

getErrorStringList

public java.util.List<java.lang.String> getErrorStringList()


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.