Class RemoteBuildLogger
- java.lang.Object
-
- com.atlassian.bamboo.build.logger.AbstractBuildLogger
-
- com.atlassian.bamboo.v2.build.agent.remote.RemoteBuildLogger
-
- All Implemented Interfaces:
BuildLogger
,BuildLoggerWithoutLogAccess
public class RemoteBuildLogger extends AbstractBuildLogger
-
-
Field Summary
-
Fields inherited from class com.atlassian.bamboo.build.logger.AbstractBuildLogger
MAX_BUILDLOG_SIZE
-
-
Constructor Summary
Constructors Constructor Description RemoteBuildLogger(File logFile, LoggerId<? extends Key> loggerId, BambooAgentMessageSender sender, ExpiryTicker expiryTicker, BuildHangingConfig buildHangingConfig, boolean dcMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull String
addBuildLogEntry(@NotNull LogEntry logEntry)
Add a new build log entry.@NotNull String
addErrorLogEntry(@NotNull LogEntry logEntry)
Add a new build error log entry.boolean
isPersistent()
void
onAddLogEntry(@NotNull LogEntry logEntry)
void
onEvent(LogsAreWatchedAgentMessage watchedAgentMessage)
void
stopStreamingBuildLogs()
Stop streaming any logs to the build logs fileboolean
transfersLogsAsArtifact()
-
Methods inherited from class com.atlassian.bamboo.build.logger.AbstractBuildLogger
addBuildLogEntry, addErrorLogEntry, addErrorLogEntry, addErrorLogEntryInternal, addLogEntry, close, getBuildLog, getErrorLog, getInterceptorStack, getLastNLogEntries, getLogEntryCount, getMutatorStack, getTimeOfLastLog, interceptAndMutate, interceptAndMutateError, setTimeOfLastLog
-
-
-
-
Constructor Detail
-
RemoteBuildLogger
public RemoteBuildLogger(File logFile, LoggerId<? extends Key> loggerId, BambooAgentMessageSender sender, ExpiryTicker expiryTicker, BuildHangingConfig buildHangingConfig, boolean dcMode)
-
-
Method Detail
-
onEvent
@EventListener public void onEvent(LogsAreWatchedAgentMessage watchedAgentMessage)
-
addBuildLogEntry
@NotNull public @NotNull String addBuildLogEntry(@NotNull @NotNull LogEntry logEntry)
Description copied from interface:BuildLoggerWithoutLogAccess
Add a new build log entry. This will get appended to the end of the log.- Specified by:
addBuildLogEntry
in interfaceBuildLoggerWithoutLogAccess
- Overrides:
addBuildLogEntry
in classAbstractBuildLogger
- Parameters:
logEntry
- The data being logged- Returns:
- The line of text being logged. From
LogEntry.getUnstyledLog()
.
-
addErrorLogEntry
@NotNull public @NotNull String addErrorLogEntry(@NotNull @NotNull LogEntry logEntry)
Description copied from interface:BuildLoggerWithoutLogAccess
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 interfaceBuildLoggerWithoutLogAccess
- Overrides:
addErrorLogEntry
in classAbstractBuildLogger
- Parameters:
logEntry
- The data being logged- Returns:
- The line of text being logged. From
LogEntry.getUnstyledLog()
.
-
onAddLogEntry
public void onAddLogEntry(@NotNull @NotNull LogEntry logEntry)
- Specified by:
onAddLogEntry
in classAbstractBuildLogger
-
stopStreamingBuildLogs
public void stopStreamingBuildLogs()
Description copied from interface:BuildLoggerWithoutLogAccess
Stop streaming any logs to the build logs file- Specified by:
stopStreamingBuildLogs
in interfaceBuildLoggerWithoutLogAccess
- Specified by:
stopStreamingBuildLogs
in classAbstractBuildLogger
-
transfersLogsAsArtifact
public boolean transfersLogsAsArtifact()
-
isPersistent
public boolean isPersistent()
- Returns:
- true if underlying logger saves to disk
-
-