com.atlassian.bamboo.build.logger
Class NullBuildLogger

java.lang.Object
  extended by com.atlassian.bamboo.build.logger.NullBuildLogger
All Implemented Interfaces:
BuildLogger

public class NullBuildLogger
extends java.lang.Object
implements BuildLogger


Constructor Summary
NullBuildLogger()
           
 
Method Summary
 java.lang.String addBuildLogEntry(LogEntry logEntry)
          Add a new build log entry.
 java.lang.String addBuildLogEntry(java.lang.String logString)
          Create a new build log entry from text to append to logs
 java.lang.String addBuildLogHeader(java.lang.String logString, boolean showBothBanner)
           
 java.lang.String addErrorLogEntry(LogEntry logEntry)
          Add a new build error log entry.
 java.lang.String addErrorLogEntry(java.lang.String logString)
          Add a new build error log entry from text.
 void clearBuildLog()
          Reset the build log, ready for the next build
 java.util.List<LogEntry> getBuildLog()
          Provide the latest build details (last 100 lines of logs).
 java.util.List<LogEntry> getErrorLog()
          Provide the latest error logs.
 java.util.List<LogEntry> getLastNLogEntries(int n)
          Provide the latest build details (last n lines of logs).
 java.util.List<java.lang.String> getStringErrorLogs()
           
 long getTimeOfLastLog()
          last time a log entry was added.
 void startStreamingBuildLogs(int buildNum, java.lang.String planKey)
          Begin streaming any logs to build logs file
 void stopStreamingBuildLogs()
          Stop streaming any logs to the build logs file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullBuildLogger

public NullBuildLogger()
Method Detail

getBuildLog

@NotNull
public java.util.List<LogEntry> getBuildLog()
Description copied from interface: BuildLogger
Provide the latest build details (last 100 lines of logs). This is not persisted.

Specified by:
getBuildLog in interface BuildLogger
Returns:
The list of LogEntrys.

getErrorLog

@NotNull
public java.util.List<LogEntry> getErrorLog()
Description copied from interface: BuildLogger
Provide the latest error logs. This is not persisted

Specified by:
getErrorLog in interface BuildLogger
Returns:
The list of LogEntrys.

getLastNLogEntries

@NotNull
public java.util.List<LogEntry> getLastNLogEntries(int n)
Description copied from interface: BuildLogger
Provide the latest build details (last n lines of logs). This is not persisted.

Specified by:
getLastNLogEntries in interface BuildLogger
Returns:
The list of LogEntrys.

getStringErrorLogs

public java.util.List<java.lang.String> getStringErrorLogs()
Specified by:
getStringErrorLogs in interface BuildLogger

addBuildLogEntry

public java.lang.String addBuildLogEntry(LogEntry logEntry)
Description copied from interface: BuildLogger
Add a new build log entry. This will get appended to the end of the log.

Specified by:
addBuildLogEntry in interface BuildLogger
Parameters:
logEntry - The data being logged
Returns:
The line of text being logged. From LogEntry.getUnstyledLog().

addBuildLogEntry

public java.lang.String addBuildLogEntry(java.lang.String logString)
Description copied from interface: BuildLogger
Create a new build log entry from text to append to logs

Specified by:
addBuildLogEntry in interface BuildLogger
Parameters:
logString - text to create log entry from
Returns:
The line of text being logged. From LogEntry.getUnstyledLog().

addBuildLogHeader

public java.lang.String addBuildLogHeader(java.lang.String logString,
                                          boolean showBothBanner)
Specified by:
addBuildLogHeader in interface BuildLogger

addErrorLogEntry

public java.lang.String addErrorLogEntry(LogEntry logEntry)
Description copied from interface: BuildLogger
Add a new build error log entry. This will get appended to the end of the log and to the end of the errors.

Specified by:
addErrorLogEntry in interface BuildLogger
Parameters:
logEntry - The data being logged
Returns:
The line of text being logged. From LogEntry.getUnstyledLog().

addErrorLogEntry

public java.lang.String addErrorLogEntry(java.lang.String logString)
Description copied from interface: BuildLogger
Add a new build error log entry from text. This will get appended to the end of the log and to the end of the errors.

Specified by:
addErrorLogEntry in interface BuildLogger
Parameters:
logString - The text to create log entry from
Returns:
The line of text being logged. From LogEntry.getUnstyledLog().

startStreamingBuildLogs

public void startStreamingBuildLogs(int buildNum,
                                    java.lang.String planKey)
Description copied from interface: BuildLogger
Begin streaming any logs to build logs file

Specified by:
startStreamingBuildLogs in interface BuildLogger

stopStreamingBuildLogs

public void stopStreamingBuildLogs()
Description copied from interface: BuildLogger
Stop streaming any logs to the build logs file

Specified by:
stopStreamingBuildLogs in interface BuildLogger

clearBuildLog

public void clearBuildLog()
Description copied from interface: BuildLogger
Reset the build log, ready for the next build

Specified by:
clearBuildLog in interface BuildLogger

getTimeOfLastLog

public long getTimeOfLastLog()
Description copied from interface: BuildLogger
last time a log entry was added. If no logs, returns 0

Specified by:
getTimeOfLastLog in interface BuildLogger
Returns:


Copyright © 2011 Atlassian. All Rights Reserved.