From 3d27fb89578e2d4e9dda8cd549895fb57e6adc62 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Thu, 9 Jan 2025 16:31:51 -0600 Subject: [PATCH] feat(kmsgLogWatcher): send event on loop start --- pkg/systemlogmonitor/logwatchers/kmsg/log_watcher_linux.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/systemlogmonitor/logwatchers/kmsg/log_watcher_linux.go b/pkg/systemlogmonitor/logwatchers/kmsg/log_watcher_linux.go index ecc40294c..dfc99f016 100644 --- a/pkg/systemlogmonitor/logwatchers/kmsg/log_watcher_linux.go +++ b/pkg/systemlogmonitor/logwatchers/kmsg/log_watcher_linux.go @@ -83,6 +83,12 @@ func (k *kernelLogWatcher) Stop() { // watchLoop is the main watch loop of kernel log watcher. func (k *kernelLogWatcher) watchLoop() { + // send event to the watcher in case we are configured to + // event on loop starts + k.logCh <- &logtypes.Log{ + Message: "[npd-internal] Entering watch loop", + Timestamp: time.Now(), + } kmsgs := k.kmsgParser.Parse() defer func() { if err := k.kmsgParser.Close(); err != nil {