Move from logrus to zerolog. ()

Signed-off-by: Antonio Navarro Perez <antnavper@gmail.com>
This commit is contained in:
Antonio Navarro Perez 2021-03-10 10:54:56 +01:00 committed by GitHub
parent 2a38efbb03
commit 3b87e4aad7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 50 additions and 39 deletions

View file

@ -7,7 +7,7 @@ import (
"path"
"github.com/distribyted/distribyted"
"github.com/sirupsen/logrus"
"github.com/rs/zerolog/log"
"gopkg.in/yaml.v3"
)
@ -44,7 +44,7 @@ func (c *Handler) createFromTemplateFile() ([]byte, error) {
func (c *Handler) GetRaw() ([]byte, error) {
f, err := ioutil.ReadFile(c.p)
if os.IsNotExist(err) {
logrus.WithField("file", c.p).Info("configuration file does not exist, creating from template file")
log.Info().Str("file", c.p).Msg("configuration file does not exist, creating from template file")
return c.createFromTemplateFile()
}