From 03bff0c8d6662504c617fdeb201e5d5ae8ceb0ad Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Feb 2022 10:03:56 +0100 Subject: [PATCH 1/4] change the default log level to error --- ocis-pkg/log/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocis-pkg/log/log.go b/ocis-pkg/log/log.go index f2ab74e1222..3c27b8026ac 100644 --- a/ocis-pkg/log/log.go +++ b/ocis-pkg/log/log.go @@ -58,7 +58,7 @@ func NewLogger(opts ...Option) Logger { zerolog.SetGlobalLevel(zerolog.DebugLevel) mlog.SetLevel(mlog.LevelTrace) default: - zerolog.SetGlobalLevel(zerolog.InfoLevel) + zerolog.SetGlobalLevel(zerolog.ErrorLevel) mlog.SetLevel(mlog.LevelInfo) } From 137d097de4e4aea900d952d54aa3d98a7a5f91e8 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Feb 2022 10:06:11 +0100 Subject: [PATCH 2/4] add changelog --- .vscode/launch.json | 6 +++--- changelog/unreleased/change-default-log-level.md | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 changelog/unreleased/change-default-log-level.md diff --git a/.vscode/launch.json b/.vscode/launch.json index 94312a3e149..bf817de7186 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,9 +12,9 @@ ], "env": { // log settings for human developers - "OCIS_LOG_LEVEL": "debug", - "OCIS_LOG_PRETTY": "true", - "OCIS_LOG_COLOR": "true", + //"OCIS_LOG_LEVEL": "debug", + //"OCIS_LOG_PRETTY": "true", + //"OCIS_LOG_COLOR": "true", // enable basic auth for dev setup so that we can use curl for testing "PROXY_ENABLE_BASIC_AUTH": "true", // set insecure options because we don't have valid certificates in dev environments diff --git a/changelog/unreleased/change-default-log-level.md b/changelog/unreleased/change-default-log-level.md new file mode 100644 index 00000000000..dd177d5dc90 --- /dev/null +++ b/changelog/unreleased/change-default-log-level.md @@ -0,0 +1,5 @@ +Change: change log level default from debug to error + +We've changed the default log level for all services from "default" to "error". + +https://github.com/owncloud/ocis/pull/3071 From b1922c20f18748c5792b3414ab84c886eb50e018 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Feb 2022 10:08:10 +0100 Subject: [PATCH 3/4] revert vscode config changes --- .vscode/launch.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bf817de7186..94312a3e149 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,9 +12,9 @@ ], "env": { // log settings for human developers - //"OCIS_LOG_LEVEL": "debug", - //"OCIS_LOG_PRETTY": "true", - //"OCIS_LOG_COLOR": "true", + "OCIS_LOG_LEVEL": "debug", + "OCIS_LOG_PRETTY": "true", + "OCIS_LOG_COLOR": "true", // enable basic auth for dev setup so that we can use curl for testing "PROXY_ENABLE_BASIC_AUTH": "true", // set insecure options because we don't have valid certificates in dev environments From 5b534f69f1b32d0a5f529f41ec585824c666202a Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Feb 2022 10:35:02 +0100 Subject: [PATCH 4/4] incorporate review changes --- changelog/unreleased/change-default-log-level.md | 2 +- ocis-pkg/log/log.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/change-default-log-level.md b/changelog/unreleased/change-default-log-level.md index dd177d5dc90..8cafda1ef96 100644 --- a/changelog/unreleased/change-default-log-level.md +++ b/changelog/unreleased/change-default-log-level.md @@ -1,5 +1,5 @@ Change: change log level default from debug to error -We've changed the default log level for all services from "default" to "error". +We've changed the default log level for all services from "info" to "error". https://github.com/owncloud/ocis/pull/3071 diff --git a/ocis-pkg/log/log.go b/ocis-pkg/log/log.go index 3c27b8026ac..255950df4b1 100644 --- a/ocis-pkg/log/log.go +++ b/ocis-pkg/log/log.go @@ -59,7 +59,7 @@ func NewLogger(opts ...Option) Logger { mlog.SetLevel(mlog.LevelTrace) default: zerolog.SetGlobalLevel(zerolog.ErrorLevel) - mlog.SetLevel(mlog.LevelInfo) + mlog.SetLevel(mlog.LevelError) } var logger zerolog.Logger