From d86981592a8e111b5decbe0e6e1531768e240cab Mon Sep 17 00:00:00 2001 From: Jan Baraniewski Date: Tue, 26 Apr 2022 03:00:16 +0200 Subject: [PATCH] Use development logging in monitor --- cmd/device-monitor/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/device-monitor/main.go b/cmd/device-monitor/main.go index 6fa77974..04ce08c4 100755 --- a/cmd/device-monitor/main.go +++ b/cmd/device-monitor/main.go @@ -16,8 +16,14 @@ import ( ) func main() { - opts := zap.Options{} - log := zap.New(zap.UseFlagOptions(&opts)) + // TODO: move this to pkg and add tests + opts := zap.Options{ + Development: true, + } + ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts))) + log := ctrl.Log.WithName("monitor") + + log.Info("Start setup") config, err := rest.InClusterConfig() if err != nil {