From acc7b4e2984b32ccc12808e9730824801c4ff967 Mon Sep 17 00:00:00 2001 From: copy rogers <40619032+rogerogers@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:51:38 +0800 Subject: [PATCH] chore(logrus): avoid using stdlogger (#47) Signed-off-by: rogerogers --- logrus/option.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/logrus/option.go b/logrus/option.go index ede7e8a..3308a83 100644 --- a/logrus/option.go +++ b/logrus/option.go @@ -62,13 +62,13 @@ type config struct { } func defaultConfig() *config { - // std logger - stdLogger := logrus.StandardLogger() + // new logger + logger := logrus.New() // default json format - stdLogger.SetFormatter(new(logrus.JSONFormatter)) + logger.SetFormatter(new(logrus.JSONFormatter)) return &config{ - logger: logrus.StandardLogger(), + logger: logger, hooks: []logrus.Hook{}, } }