From 40ee5fb11b852ff05d7e054465f8fa524874e8a2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 16 Jul 2023 21:58:38 +0200 Subject: [PATCH] log: SetFormat: include returns in switch Signed-off-by: Sebastiaan van Stijn --- log/context.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/context.go b/log/context.go index b63c602f4..dbf967984 100644 --- a/log/context.go +++ b/log/context.go @@ -89,15 +89,15 @@ func SetFormat(format string) error { TimestampFormat: RFC3339NanoFixed, FullTimestamp: true, }) + return nil case JSONFormat: logrus.SetFormatter(&logrus.JSONFormatter{ TimestampFormat: RFC3339NanoFixed, }) + return nil default: return fmt.Errorf("unknown log format: %s", format) } - - return nil } // WithLogger returns a new context with the provided logger. Use in