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 StringaddBuildLogEntry(@NotNull LogEntry logEntry)Add a new build log entry.@NotNull StringaddErrorLogEntry(@NotNull LogEntry logEntry)Add a new build error log entry.booleanisPersistent()voidonAddLogEntry(@NotNull LogEntry logEntry)voidonEvent(LogsAreWatchedAgentMessage watchedAgentMessage)voidstopStreamingBuildLogs()Stop streaming any logs to the build logs filebooleantransfersLogsAsArtifact()-
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:BuildLoggerWithoutLogAccessAdd a new build log entry. This will get appended to the end of the log.- Specified by:
addBuildLogEntryin interfaceBuildLoggerWithoutLogAccess- Overrides:
addBuildLogEntryin 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:BuildLoggerWithoutLogAccessAdd 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:
addErrorLogEntryin interfaceBuildLoggerWithoutLogAccess- Overrides:
addErrorLogEntryin 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:
onAddLogEntryin classAbstractBuildLogger
-
stopStreamingBuildLogs
public void stopStreamingBuildLogs()
Description copied from interface:BuildLoggerWithoutLogAccessStop streaming any logs to the build logs file- Specified by:
stopStreamingBuildLogsin interfaceBuildLoggerWithoutLogAccess- Specified by:
stopStreamingBuildLogsin classAbstractBuildLogger
-
transfersLogsAsArtifact
public boolean transfersLogsAsArtifact()
-
isPersistent
public boolean isPersistent()
- Returns:
- true if underlying logger saves to disk
-
-