From e538485b84153c7101b572f1831cbd33cd58bc16 Mon Sep 17 00:00:00 2001 From: postmannen Date: Fri, 16 Apr 2021 12:45:14 +0200 Subject: [PATCH] changed log output for commandorevent available --- command_event_type.go | 8 ++------ ringbuffer.go | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/command_event_type.go b/command_event_type.go index a11d0c2..246745e 100644 --- a/command_event_type.go +++ b/command_event_type.go @@ -6,10 +6,6 @@ package steward -import ( - "log" -) - // CommandOrEvent describes on the message level if this is // an event or command kind of message in the Subject name. // This field is mainly used to be able to spawn up different @@ -63,10 +59,10 @@ type CommandOrEventAvailable struct { func (co CommandOrEventAvailable) CheckIfExists(c CommandOrEvent, subject Subject) bool { _, ok := co.topics[c] if ok { - log.Printf("info: CommandOrEventAvailable.CheckIfExists: command or event found: %v, for %v\n", c, subject.name()) + // log.Printf("info: CommandOrEventAvailable.CheckIfExists: command or event found: %v, for %v\n", c, subject.name()) return true } else { - log.Printf("error: CommandOrEventAvailable.CheckIfExists: command or event not found: %v, for %v\n", c, subject.name()) + // log.Printf("error: CommandOrEventAvailable.CheckIfExists: command or event not found: %v, for %v\n", c, subject.name()) return false } } diff --git a/ringbuffer.go b/ringbuffer.go index 06e9e7c..7899d44 100644 --- a/ringbuffer.go +++ b/ringbuffer.go @@ -114,7 +114,7 @@ func (r *ringBuffer) fillBuffer(inCh chan subjectAndMessage, samValueBucket stri // Check if the command or event exists in commandOrEvent.go if !coeAvailable.CheckIfExists(v.CommandOrEvent, v.Subject) { - er := fmt.Errorf("error: fillBuffer: the event or command type do not exist, so this message will not be put on the buffer to be processed. Check the syntax used in the json file for the message. Allowed values are : %v", coeAvailableValues) + er := fmt.Errorf("error: fillBuffer: the event or command type do not exist, so this message will not be put on the buffer to be processed. Check the syntax used in the json file for the message. Allowed values are : %v, where given: coe=%v, with subject=%v", coeAvailableValues, v.CommandOrEvent, v.Subject) sendErrorLogMessage(r.newMessagesCh, node(r.nodeName), er) fmt.Println()