Hide/Show state deltas.
This commit is contained in:
parent
4f9eb125a4
commit
0bfdd7e661
2 changed files with 9 additions and 4 deletions
|
|
@ -489,8 +489,10 @@ class Bouncer
|
|||
// Calculate Container State Hash
|
||||
$containerStateDiff = $this->diff($this->previousContainerState, $newContainerState);
|
||||
if (!$isTainted && !empty($containerStateDiff)) {
|
||||
$this->logger->warning(' Container state has changed', ['emoji' => Emoji::warning()]);
|
||||
echo $containerStateDiff;
|
||||
if($this->settings->get('logger/show_state_deltas', false)) {
|
||||
$this->logger->warning(' Container state has changed', ['emoji' => Emoji::warning()]);
|
||||
echo $containerStateDiff;
|
||||
}
|
||||
$isTainted = true;
|
||||
}
|
||||
$this->previousContainerState = $newContainerState;
|
||||
|
|
@ -527,8 +529,10 @@ class Bouncer
|
|||
// Calculate Swarm State Hash, if applicable
|
||||
$swarmStateDiff = $this->diff($this->previousSwarmState, $newSwarmState);
|
||||
if ($this->isSwarmMode() && !$isTainted && !empty($swarmStateDiff)) {
|
||||
$this->logger->warning(' Swarm state has changed', ['emoji' => Emoji::warning()]);
|
||||
echo $swarmStateDiff;
|
||||
if($this->settings->get('logger/show_state_deltas', false)){
|
||||
$this->logger->warning(' Swarm state has changed', ['emoji' => Emoji::warning()]);
|
||||
echo $swarmStateDiff;
|
||||
}
|
||||
$isTainted = true;
|
||||
}
|
||||
$this->previousSwarmState = $newSwarmState;
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class Settings implements SettingsInterface
|
|||
'line_format' => Settings::getEnvironment('LOG_LINE_FORMAT', '[%datetime%] %context.emoji% %level_name%: %channel%: %message%') . "\n",
|
||||
'max_level_name_length' => Settings::getEnvironment('LOG_LEVEL_NAME_LENGTH', 4),
|
||||
'coloured_output' => Settings::isEnabled('LOG_COLOUR', true),
|
||||
'show_state_deltas' => Settings::isEnabled('LOG_SHOW_STATE_DELTAS', false),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue