From aea5d74d535290d023b86462196b67e716bfc50f Mon Sep 17 00:00:00 2001 From: Matthieu 'JP' DERASSE Date: Sat, 17 Dec 2022 19:54:19 +0000 Subject: [PATCH] fix(log): Allow log without any provider --- log/log.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log/log.go b/log/log.go index 5a321ff..bf8af93 100644 --- a/log/log.go +++ b/log/log.go @@ -66,7 +66,7 @@ func InitFromCustomConfig(c *ConfigStruct) (*logrus.Logger, error) { level, err := logrus.ParseLevel(*c.Level) if err != nil { - return nil, err + return nil, errors.Trace(err) } // init logger @@ -94,7 +94,7 @@ func InitFromCustomConfig(c *ConfigStruct) (*logrus.Logger, error) { } log.AddHook(hook) case ProviderName_NONE: - fallthrough + // Do nothing, None can be use in case of StdOut Only. default: return nil, errors.BadRequestf("Provider is not handled.") }