From d2129bb114a48f6925890fd68d453d5297006ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=85=E5=AD=90?= Date: Fri, 27 May 2022 10:22:34 +0800 Subject: [PATCH] fix: config log --- config/reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/reader.go b/config/reader.go index d0b98e9c0..221ac6ce5 100644 --- a/config/reader.go +++ b/config/reader.go @@ -47,11 +47,11 @@ func (r *reader) Merge(kvs ...*KeyValue) error { for _, kv := range kvs { next := make(map[string]interface{}) if err := r.opts.decoder(kv, next); err != nil { - _ = r.opts.logger.Log(log.LevelError, fmt.Sprintf("config decode error, err: %v, key: %s, value: %s", err, kv.Key, string(kv.Value))) + _ = log.GetLogger().Log(log.LevelError, fmt.Sprintf("config decode error, err: %v, key: %s, value: %s", err, kv.Key, string(kv.Value))) return err } if err := mergo.Map(&merged, convertMap(next), mergo.WithOverride); err != nil { - _ = r.opts.logger.Log(log.LevelError, fmt.Sprintf("config merge error, err: %v, key: %s, value: %s", err, kv.Key, string(kv.Value))) + _ = log.GetLogger().Log(log.LevelError, fmt.Sprintf("config merge error, err: %v, key: %s, value: %s", err, kv.Key, string(kv.Value))) return err } }