Interface EphemeralAgentManagementLogger
- All Known Implementing Classes:
EphemeralAgentManagementLoggerImpl
@PublicApi
public interface EphemeralAgentManagementLogger
Logger responsible for ephemeral agents management related actions. Used for tracking communication with k8s cluster.
since 9.3
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Log type that provides both message and the status of whether the message describes successful action. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEphemeralLogEntry
(@NotNull org.apache.logging.log4j.Logger logger, @NotNull String message, boolean isSuccessfulMessage) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached.void
addEphemeralLogEntry
(@NotNull org.apache.logging.log4j.Logger logger, @NotNull String message, @NotNull AgentMaintenanceResult clusterCommunicationResult) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached.void
addEphemeralLogEntry
(@NotNull org.apache.logging.log4j.Logger logger, @NotNull String message, @NotNull AgentMaintenanceResult clusterCommunicationResult, boolean printSuccessfulResult, boolean logOnlyToEphemeralLogger) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached.Return N last ephemeral agents related logs.
-
Method Details
-
addEphemeralLogEntry
void addEphemeralLogEntry(@NotNull @NotNull org.apache.logging.log4j.Logger logger, @NotNull @NotNull String message, boolean isSuccessfulMessage) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached. Also, the method immediately logs the message to the Bamboo instance logs with the provided logger.- Parameters:
logger
- logger used to log the message to Bamboo logsmessage
- information to keepisSuccessfulMessage
- whether the passed message indicates the successful action
-
addEphemeralLogEntry
void addEphemeralLogEntry(@NotNull @NotNull org.apache.logging.log4j.Logger logger, @NotNull @NotNull String message, @NotNull @NotNull AgentMaintenanceResult clusterCommunicationResult) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached. The log entry contains both the message and cluster-related communication result associated with the message. Also, the method immediately logs the message to the Bamboo instance logs with the provided logger. The Successful result will be printed. In order to reduce noise, useaddEphemeralLogEntry(Logger, String, AgentMaintenanceResult, boolean, boolean)
with printSuccessfulResult and logOnlyToEphemeralLogger set to true- Parameters:
logger
- logger used to log the message to Bamboo logsmessage
- information to keepclusterCommunicationResult
- cluster communication result
-
addEphemeralLogEntry
void addEphemeralLogEntry(@NotNull @NotNull org.apache.logging.log4j.Logger logger, @NotNull @NotNull String message, @NotNull @NotNull AgentMaintenanceResult clusterCommunicationResult, boolean printSuccessfulResult, boolean logOnlyToEphemeralLogger) Adds the log entry to the N last ephemeral logs and evicts the oldest one if the capacity is reached. The log entry contains both the message and cluster-related communication result associated with the message. Also, the method immediately logs the message to the Bamboo instance logs with the provided logger.- Parameters:
logger
- logger used to log the message to Bamboo logsmessage
- information to keepclusterCommunicationResult
- cluster communication resultprintSuccessfulResult
- print successful messages to the logslogOnlyToEphemeralLogger
- if true, the message will be logger to the Bamboo Ephemeral logs only, if false it will be logged on both Ephemeral and Bamboo instance logs
-
getEphemeralAgentLogs
Return N last ephemeral agents related logs.- Returns:
- list of formatted logs
-