From fa024e6ac2c93ed3221919f338275a00bb553028 Mon Sep 17 00:00:00 2001 From: xmdhs Date: Tue, 10 Oct 2023 00:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=A4=A7=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + cmd/authlibskin/config.yaml.template | 4 ++-- config/yaml.go | 1 - server/provide.go | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5dabd98..e7f3b39 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ cmd/testserver +cmd/authlibskin/config.yaml diff --git a/cmd/authlibskin/config.yaml.template b/cmd/authlibskin/config.yaml.template index 7319130..963027a 100644 --- a/cmd/authlibskin/config.yaml.template +++ b/cmd/authlibskin/config.yaml.template @@ -5,9 +5,9 @@ offlineUUID: true port: "0.0.0.0:8080" Log: - Level: "debug" + level: "debug" # json 格式输出 - Json: false + json: false sql: mysqlDsn: "" diff --git a/config/yaml.go b/config/yaml.go index fb2de93..b471736 100644 --- a/config/yaml.go +++ b/config/yaml.go @@ -12,6 +12,5 @@ func YamlDeCode(b []byte) (Config, error) { if err != nil { return c, fmt.Errorf("YamlDeCode: %w", err) } - fmt.Println(c) return c, nil } diff --git a/server/provide.go b/server/provide.go index 42d6e73..6176fee 100644 --- a/server/provide.go +++ b/server/provide.go @@ -32,6 +32,8 @@ func ProvideSlog(c config.Config) slog.Handler { level = slog.LevelWarn case "error": level = slog.LevelError + default: + level = slog.LevelDebug } o := &slog.HandlerOptions{Level: level}