mirror of
https://github.com/postmannen/ctrl.git
synced 2025-01-05 20:09:16 +00:00
replaced logging of new messages in read folder with a logDebug so we don't send those messages to the error kernel
This commit is contained in:
parent
cef1170233
commit
8c68b87fbe
2 changed files with 7 additions and 1 deletions
|
@ -240,6 +240,12 @@ func (e errorEvent) Error() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// errSend will just send an error message to the errorCentral.
|
// errSend will just send an error message to the errorCentral.
|
||||||
|
// As input arguments it takes:
|
||||||
|
//
|
||||||
|
// The process where the error was generated.
|
||||||
|
// A message, where this can be an Message{} if you don't want to log the message
|
||||||
|
// or an actual message.
|
||||||
|
// The error, and a logLevel.
|
||||||
func (e *errorKernel) errSend(proc process, msg Message, err error, logLevel logLevel) {
|
func (e *errorKernel) errSend(proc process, msg Message, err error, logLevel logLevel) {
|
||||||
ev := errorEvent{
|
ev := errorEvent{
|
||||||
err: err,
|
err: err,
|
||||||
|
|
|
@ -290,7 +290,7 @@ func (s *server) readFolder() {
|
||||||
}
|
}
|
||||||
|
|
||||||
er := fmt.Errorf("readFolder: read new message in readfolder and putting it on s.samToSendCh: %#v", sams)
|
er := fmt.Errorf("readFolder: read new message in readfolder and putting it on s.samToSendCh: %#v", sams)
|
||||||
s.errorKernel.errSend(s.processInitial, Message{}, er, logDebug)
|
s.errorKernel.logDebug(er, s.configuration)
|
||||||
|
|
||||||
// Send the SAM struct to be picked up by the ring buffer.
|
// Send the SAM struct to be picked up by the ring buffer.
|
||||||
s.samToSendCh <- sams
|
s.samToSendCh <- sams
|
||||||
|
|
Loading…
Reference in a new issue