fix(log): Allow log without any provider

This commit is contained in:
Matthieu 'JP' DERASSE 2022-12-17 19:54:19 +00:00
parent 06f0722cdb
commit aea5d74d53
Signed by: mderasse
GPG Key ID: 55141C777B16A705

View File

@ -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.")
}