From 4ffa7ba364c119173d9650b165c858fa1581d274 Mon Sep 17 00:00:00 2001 From: Roberto Hidalgo Date: Wed, 19 Jun 2024 17:27:47 -0600 Subject: [PATCH] add SetOutput to logger for testing convenience --- pkg/logger/log.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/logger/log.go b/pkg/logger/log.go index 393e4da..7e19fe8 100644 --- a/pkg/logger/log.go +++ b/pkg/logger/log.go @@ -4,6 +4,7 @@ package logger import ( "context" + "io" "git.rob.mx/nidito/chinampa/pkg/runtime" "github.com/sirupsen/logrus" @@ -47,6 +48,10 @@ func Configure(name string, level Level) { } } +func SetOutput(out io.Writer) { + logrus.SetOutput(out) +} + func Debug(args ...any) { Main.Debug(args...) }