From dd7691c4868ee8a3cb059301f3225193a7403ef7 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 2 Mar 2021 18:44:28 +0200 Subject: [PATCH] nfd-worker: improve log messages of config handling --- pkg/nfd-worker/nfd-worker.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/nfd-worker/nfd-worker.go b/pkg/nfd-worker/nfd-worker.go index a31fc9251..1f1349aa7 100644 --- a/pkg/nfd-worker/nfd-worker.go +++ b/pkg/nfd-worker/nfd-worker.go @@ -394,7 +394,7 @@ func (w *nfdWorker) configureCore(c coreConfig) error { v = a.DefValue() } if err := a.SetFromConfig(v); err != nil { - return err + return fmt.Errorf("failed to set logger option klog.%s = %v: %v", k, v, err) } } } @@ -462,7 +462,7 @@ func (w *nfdWorker) configure(filepath string, overrides string) error { if err != nil { return fmt.Errorf("failed to parse config file: %s", err) } - klog.Infof("configuration successfully loaded from %q", filepath) + klog.Infof("configuration file %q parsed", filepath) } } @@ -497,6 +497,8 @@ func (w *nfdWorker) configure(filepath string, overrides string) error { s.SetConfig(c.Sources[s.Name()]) } + klog.Infof("worker (re-)configuration successfully completed") + return nil }