Class DefaultBuildLoggerManager
java.lang.Object
com.atlassian.bamboo.build.logger.DefaultBuildLoggerManager
- All Implemented Interfaces:
BuildLoggerManager
,FlushableBuildLoggerManager
,ServerBuildLoggerManager
public class DefaultBuildLoggerManager
extends Object
implements FlushableBuildLoggerManager, ServerBuildLoggerManager
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Future<?>
Flush active file logs to disk.@NotNull FileWritingBuildLogger
getFileWritingLogger
(@NotNull LoggerId<? extends Key> loggerId) Returns aBuildLogger
.@NotNull BuildLogger
Returns aBuildLogger
for the given plan@NotNull BuildLogger
Returns aBuildLogger
for the given result.<T extends Key>
@NotNull BuildLoggerWithoutLogAccessgetLoggerWithoutLogAccess
(@NotNull LoggerId<T> loggerId) Returns aBuildLoggerWithoutLogAccess
for the givenLoggerId
@NotNull BuildLoggerWithoutLogAccess
getLoggerWithoutLogAccess
(@NotNull Key key) Returns aBuildLoggerWithoutLogAccess
for the given result@NotNull FileWritingBuildLogger
getNonPersistentLogger
(@NotNull ResultKey resultKey) Returns aBuildLogger
for the given result.getPersistentLogger
(@NotNull ResultKey resultKey) Returns aBuildLogger
for the given result.void
removeBuildLogger
(PlanKey planKey) Removes plan logger for given plan key.void
removeBuildLogger
(PlanResultKey buildResultKey) Removes buildLogger for finished build process.void
removeLogger
(@NotNull ResultKey resultKey) Remove a logger if you are finished with it.<T extends Key>
voidremoveLogger
(LoggerId<T> loggerId) Remove a logger if you are finished with it.void
transferLogs
(BuildLogger buildLogger, CommonContext commonContext) Transfers log to the final location.
-
Field Details
-
LOG_TRANSMISSION_KEEPALIVE_SECONDS
public static final long LOG_TRANSMISSION_KEEPALIVE_SECONDS- See Also:
-
-
Constructor Details
-
DefaultBuildLoggerManager
-
-
Method Details
-
getLogger
Description copied from interface:BuildLoggerManager
Returns aBuildLogger
for the given plan- Specified by:
getLogger
in interfaceBuildLoggerManager
-
getLogger
Description copied from interface:BuildLoggerManager
Returns aBuildLogger
for the given result. Does not guarantee a persistent logger.- Specified by:
getLogger
in interfaceBuildLoggerManager
- Returns:
-
getPersistentLogger
Description copied from interface:ServerBuildLoggerManager
Returns aBuildLogger
for the given result. Enforces switching logger to persistent if current logger is not persistent. Internal use only.- Specified by:
getPersistentLogger
in interfaceServerBuildLoggerManager
-
getNonPersistentLogger
@NotNull public @NotNull FileWritingBuildLogger getNonPersistentLogger(@NotNull @NotNull ResultKey resultKey) Description copied from interface:ServerBuildLoggerManager
Returns aBuildLogger
for the given result. Enforces switching logger to non persistent if current logger is persistent. Internal use only.- Specified by:
getNonPersistentLogger
in interfaceServerBuildLoggerManager
-
getFileWritingLogger
@NotNull public @NotNull FileWritingBuildLogger getFileWritingLogger(@NotNull @NotNull LoggerId<? extends Key> loggerId) Description copied from interface:ServerBuildLoggerManager
Returns aBuildLogger
. Enforces switching persistence on/off if necessary. Internal use only.- Specified by:
getFileWritingLogger
in interfaceServerBuildLoggerManager
-
getLoggerWithoutLogAccess
@NotNull public @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull Key key) Description copied from interface:BuildLoggerManager
Returns aBuildLoggerWithoutLogAccess
for the given result- Specified by:
getLoggerWithoutLogAccess
in interfaceBuildLoggerManager
- Returns:
-
getLoggerWithoutLogAccess
@NotNull public <T extends Key> @NotNull BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull @NotNull LoggerId<T> loggerId) Description copied from interface:BuildLoggerManager
Returns aBuildLoggerWithoutLogAccess
for the givenLoggerId
- Specified by:
getLoggerWithoutLogAccess
in interfaceBuildLoggerManager
-
removeBuildLogger
Description copied from interface:BuildLoggerManager
Removes plan logger for given plan key.- Specified by:
removeBuildLogger
in interfaceBuildLoggerManager
-
removeBuildLogger
Description copied from interface:BuildLoggerManager
Removes buildLogger for finished build process. Removed build logger is not used anymore as build has been finished and build result should be persisted already.- Specified by:
removeBuildLogger
in interfaceBuildLoggerManager
-
removeLogger
Description copied from interface:BuildLoggerManager
Remove a logger if you are finished with it.- Specified by:
removeLogger
in interfaceBuildLoggerManager
- Parameters:
loggerId
- of the logger to remove
-
removeLogger
Description copied from interface:BuildLoggerManager
Remove a logger if you are finished with it.- Specified by:
removeLogger
in interfaceBuildLoggerManager
-
transferLogs
Description copied from interface:BuildLoggerManager
Transfers log to the final location. Called when the build/deployment is finished.- Specified by:
transferLogs
in interfaceBuildLoggerManager
-
flushAllFileLogs
Description copied from interface:FlushableBuildLoggerManager
Flush active file logs to disk.- Specified by:
flushAllFileLogs
in interfaceFlushableBuildLoggerManager
- Returns:
- future that is done when all the processing is finished.
-