From 9fb7aaedae92c5f715969542ec18cee70dad3584 Mon Sep 17 00:00:00 2001 From: dehort Date: Thu, 5 Sep 2024 15:23:58 -0500 Subject: [PATCH] Fixing a logging issue (#385) --- internal/validator/handler.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/validator/handler.go b/internal/validator/handler.go index 63d7798d..184ec08a 100644 --- a/internal/validator/handler.go +++ b/internal/validator/handler.go @@ -168,7 +168,7 @@ func (this *handler) validateContent(ctx context.Context, requestType string, da // FIXME: make this configurable truncateData := len(data) >= 1*1024*1024 if truncateData { - log.Debugw("Payload too big. Truncating payload.") + log.Debug("Payload too big. Truncating payload.") } eventTypeCount := make(map[string]int) @@ -200,7 +200,7 @@ func (this *handler) validateContent(ctx context.Context, requestType string, da if validatedEvent.Type == "playbook_run_completed" || validatedEvent.Type == "playbook_run_finished" { storeEvent = true - log.Debugw("storing run complete/finished for host " /*, *validatedEvent.Host*/) + log.Debug("storing run complete/finished for host " /*, *validatedEvent.Host*/) } if validatedEvent.Type == "playbook_run_update" { @@ -208,7 +208,7 @@ func (this *handler) validateContent(ctx context.Context, requestType string, da if validatedEvent.Host != nil { if _, ok := hostRunningPlaybook[*validatedEvent.Host]; !ok { storeEvent = true - log.Debugw("storing run update for host ", *validatedEvent.Host) + log.Debugf("storing run update for host %s", *validatedEvent.Host) } hostRunningPlaybook[*validatedEvent.Host]++ @@ -217,7 +217,7 @@ func (this *handler) validateContent(ctx context.Context, requestType string, da } if storeEvent { - log.Debugw("storing event ", validatedEvent.Type) + log.Debugf("storing event %s ", validatedEvent.Type) events.PlaybookSat = append(events.PlaybookSat, *validatedEvent) } @@ -240,7 +240,7 @@ func (this *handler) validateContent(ctx context.Context, requestType string, da } if storeEvent { - log.Debugw("storing event ", validatedEvent.Event) + log.Debugf("storing event %s", validatedEvent.Event) events.Playbook = append(events.Playbook, *validatedEvent) } }