mirror of
https://github.com/postmannen/ctrl.git
synced 2025-03-05 06:46:48 +00:00
changed log output for commandorevent available
This commit is contained in:
parent
a335c8c33a
commit
e538485b84
2 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue