1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

added logging to central when message read on socket

This commit is contained in:
postmannen 2022-03-22 14:02:25 +01:00
parent f973c16321
commit 99832f87ce

View file

@ -203,6 +203,11 @@ func (s *server) readSocket() {
// Fill in the value for the FromNode field, so the receiver
// can check this field to know where it came from.
sams[i].Message.FromNode = Node(s.nodeName)
// Send an info message to the central about the message picked
// for auditing.
er := fmt.Errorf("info: message read from socket on %v: %v", s.nodeName, sams[i].Message)
s.processes.errorKernel.errSend(s.processInitial, Message{}, er)
}
// Send the SAM struct to be picked up by the ring buffer.