public class DefaultBuildLoggerManager extends Object implements FlushableBuildLoggerManager, ServerBuildLoggerManager
Modifier and Type | Field and Description |
---|---|
static long |
LOG_TRANSMISSION_KEEPALIVE_SECONDS |
Constructor and Description |
---|
DefaultBuildLoggerManager(ExpiryTicker expiryTicker) |
Modifier and Type | Method and Description |
---|---|
Future<?> |
flushAllFileLogs()
Flush active file logs to disk.
|
FileWritingBuildLogger |
getFileWritingLogger(LoggerId<? extends Key> loggerId)
Returns a
BuildLogger . |
BuildLogger |
getLogger(Key key)
Returns a
BuildLogger for the given plan |
BuildLogger |
getLogger(ResultKey resultKey)
Returns a
BuildLogger for the given result. |
BuildLoggerWithoutLogAccess |
getLoggerWithoutLogAccess(Key key)
Returns a
BuildLoggerWithoutLogAccess for the given result |
BuildLoggerWithoutLogAccess |
getLoggerWithoutLogAccess(LoggerId loggerId)
Returns a
BuildLoggerWithoutLogAccess for the given LoggerId |
FileWritingBuildLogger |
getNonPersistentLogger(ResultKey resultKey)
Returns a
BuildLogger for the given result. |
FileWritingBuildLogger |
getPersistentLogger(ResultKey resultKey)
Returns a
BuildLogger 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(LoggerId loggerId)
Remove a logger if you are finished with it.
|
void |
removeLogger(ResultKey resultKey)
Remove a logger if you are finished with it.
|
void |
transferLogs(BuildLogger buildLogger,
CommonContext commonContext)
Transfers log to the final location.
|
public static final long LOG_TRANSMISSION_KEEPALIVE_SECONDS
public DefaultBuildLoggerManager(@NotNull ExpiryTicker expiryTicker)
@NotNull public BuildLogger getLogger(@NotNull Key key)
BuildLoggerManager
BuildLogger
for the given plangetLogger
in interface BuildLoggerManager
@NotNull public BuildLogger getLogger(@NotNull ResultKey resultKey)
BuildLoggerManager
BuildLogger
for the given result.
Does not guarantee a persistent logger.getLogger
in interface BuildLoggerManager
public FileWritingBuildLogger getPersistentLogger(@NotNull ResultKey resultKey)
ServerBuildLoggerManager
BuildLogger
for the given result.
Enforces switching logger to persistent if current logger is not persistent.
Internal use only.getPersistentLogger
in interface ServerBuildLoggerManager
@NotNull public FileWritingBuildLogger getNonPersistentLogger(@NotNull ResultKey resultKey)
ServerBuildLoggerManager
BuildLogger
for the given result.
Enforces switching logger to non persistent if current logger is persistent.
Internal use only.getNonPersistentLogger
in interface ServerBuildLoggerManager
@NotNull public FileWritingBuildLogger getFileWritingLogger(@NotNull LoggerId<? extends Key> loggerId)
ServerBuildLoggerManager
BuildLogger
.
Enforces switching persistence on/off if necessary.
Internal use only.getFileWritingLogger
in interface ServerBuildLoggerManager
@NotNull public BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull Key key)
BuildLoggerManager
BuildLoggerWithoutLogAccess
for the given resultgetLoggerWithoutLogAccess
in interface BuildLoggerManager
@NotNull public BuildLoggerWithoutLogAccess getLoggerWithoutLogAccess(@NotNull LoggerId loggerId)
BuildLoggerManager
BuildLoggerWithoutLogAccess
for the given LoggerId
getLoggerWithoutLogAccess
in interface BuildLoggerManager
public void removeBuildLogger(PlanKey planKey)
BuildLoggerManager
removeBuildLogger
in interface BuildLoggerManager
public void removeBuildLogger(PlanResultKey buildResultKey)
BuildLoggerManager
removeBuildLogger
in interface BuildLoggerManager
public void removeLogger(LoggerId loggerId)
BuildLoggerManager
removeLogger
in interface BuildLoggerManager
loggerId
- of the logger to removepublic void removeLogger(@NotNull ResultKey resultKey)
BuildLoggerManager
removeLogger
in interface BuildLoggerManager
public void transferLogs(BuildLogger buildLogger, CommonContext commonContext)
BuildLoggerManager
transferLogs
in interface BuildLoggerManager
@NotNull public Future<?> flushAllFileLogs()
FlushableBuildLoggerManager
flushAllFileLogs
in interface FlushableBuildLoggerManager
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.