diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a02d3057cf0f..9473211369db 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -140,6 +140,7 @@ automatic splitting at root level, if root level element is an array. {pull}3415 - Fix issue using projects in airgapped environments by disabling npm audit. {pull}34936[34936] - Fix broken state ID location naming. {pull}35336[35336] - Fix output pipeline exit on run_once. {pull}35376[35376] +- Fix formatting issue with socket trace timeout. {pull}35434[35434] *Heartbeat* diff --git a/heartbeat/beater/heartbeat.go b/heartbeat/beater/heartbeat.go index d506dfe02ecd..64566cc8b202 100644 --- a/heartbeat/beater/heartbeat.go +++ b/heartbeat/beater/heartbeat.go @@ -92,10 +92,10 @@ func New(b *beat.Beat, rawConfig *conf.C) (beat.Beater, error) { if stConfig != nil { // Note this, intentionally, blocks until connected to the trace endpoint var err error - logp.L().Info("Setting up sock tracer at %s (wait: %s)", stConfig.Path, stConfig.Wait) + logp.L().Infof("Setting up sock tracer at %s (wait: %s)", stConfig.Path, stConfig.Wait) trace, err = tracer.NewSockTracer(stConfig.Path, stConfig.Wait) if err != nil { - logp.L().Fatal("could not connect to socket trace at path %s after %s timeout: %s", stConfig.Path, stConfig.Wait, err) + logp.L().Fatalf("could not connect to socket trace at path %s after %s timeout: %w", stConfig.Path, stConfig.Wait, err) } } diff --git a/heartbeat/tracer/tracer.go b/heartbeat/tracer/tracer.go index 81c16268235c..d2e4e355856e 100644 --- a/heartbeat/tracer/tracer.go +++ b/heartbeat/tracer/tracer.go @@ -47,10 +47,10 @@ func NewSockTracer(path string, wait time.Duration) (st SockTracer, err error) { return st, fmt.Errorf("wait time for sock trace exceeded: %s", wait) } if _, err := os.Stat(st.path); err == nil { - logp.L().Info("socktracer found file for unix socket: %s, will attempt to connect") + logp.L().Infof("socktracer found file for unix socket: %s, will attempt to connect") break } else { - logp.L().Info("socktracer could not find file for unix socket at: %s, will retry in %s", delay) + logp.L().Infof("socktracer could not find file for unix socket at: %s, will retry in %s", delay) time.Sleep(delay) } }