From 67e87adf897956bf458067c7f3571b2eb65d776b Mon Sep 17 00:00:00 2001 From: William Petit Date: Tue, 17 Mar 2020 13:37:11 +0100 Subject: [PATCH] logger: add SetFormat function --- logger/logger.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/logger/logger.go b/logger/logger.go index 22828c4..d3b9e0e 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -99,3 +99,7 @@ func E(err error) Field { func SetLevel(level Level) { defaultLogger = defaultLogger.Leveled(level) } + +func SetFormat(format Format) { + defaultLogger = Make(format, os.Stdout) +}