From 88209386249db87f50ea5015b3cd26078451f639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Tue, 29 Aug 2023 19:41:46 +0200 Subject: [PATCH] Increase severity of two log statements. --- internal/nomad/nomad.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/nomad/nomad.go b/internal/nomad/nomad.go index d8f8208..29fc448 100644 --- a/internal/nomad/nomad.go +++ b/internal/nomad/nomad.go @@ -339,13 +339,6 @@ func handleAllocationEvent(startTime int64, allocations storage.Storage[*allocat return nil } - log.WithField("alloc_id", alloc.ID). - WithField("ClientStatus", alloc.ClientStatus). - WithField("DesiredStatus", alloc.DesiredStatus). - WithField("PrevAllocation", alloc.PreviousAllocation). - WithField("NextAllocation", alloc.NextAllocation). - Debug("Handle Allocation Event") - // When starting the API and listening on the Nomad event stream we might get events that already // happened from Nomad as it seems to buffer them for a certain duration. // Ignore old events here. @@ -357,6 +350,13 @@ func handleAllocationEvent(startTime int64, allocations storage.Storage[*allocat return nil } + log.WithField("alloc_id", alloc.ID). + WithField("ClientStatus", alloc.ClientStatus). + WithField("DesiredStatus", alloc.DesiredStatus). + WithField("PrevAllocation", alloc.PreviousAllocation). + WithField("NextAllocation", alloc.NextAllocation). + Debug("Handle Allocation Event") + allocData := updateAllocationData(alloc, allocations) switch alloc.ClientStatus { @@ -387,10 +387,10 @@ func filterDuplicateEvents(alloc *nomadApi.Allocation, allocations storage.Stora return true case !ok: // This case happens in case of an error or when an event that led to the deletion of the alloc data is duplicated. - log.WithField("alloc", alloc).Trace("Ignoring unknown allocation") + log.WithField("alloc", alloc).Debug("Ignoring unknown allocation") return false case alloc.ClientStatus == allocData.allocClientStatus && alloc.DesiredStatus == allocData.allocDesiredStatus: - log.WithField("alloc", alloc).Trace("Ignoring duplicate event") + log.WithField("alloc", alloc).Debug("Ignoring duplicate event") return false default: return true