From 79c3329502217b664ef81d3f7f65aaf58282d29d Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 20 Aug 2023 09:05:29 +0800 Subject: [PATCH] Do not use deprecated log config options by default (#26592) Simplify the log config * Remove unnecessary `ROUTER` config, it defaults to the `MODE`. * `XORM` config was deprecated --- docker/root/etc/templates/app.ini | 1 - tests/mssql.ini.tmpl | 3 +-- tests/mysql.ini.tmpl | 3 +-- tests/mysql8.ini.tmpl | 3 +-- tests/pgsql.ini.tmpl | 3 +-- tests/sqlite.ini.tmpl | 3 +-- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/docker/root/etc/templates/app.ini b/docker/root/etc/templates/app.ini index 7e8aa0bd0..01fb407f4 100644 --- a/docker/root/etc/templates/app.ini +++ b/docker/root/etc/templates/app.ini @@ -46,7 +46,6 @@ PATH = /data/gitea/attachments [log] MODE = console LEVEL = info -ROUTER = console ROOT_PATH = /data/gitea/log [security] diff --git a/tests/mssql.ini.tmpl b/tests/mssql.ini.tmpl index 93ade7480..d4562586f 100644 --- a/tests/mssql.ini.tmpl +++ b/tests/mssql.ini.tmpl @@ -86,9 +86,8 @@ PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/sessions [log] MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mssql-log -ROUTER = , -XORM = file ENABLE_SSH_LOG = true +logger.xorm.MODE = file [log.test] LEVEL = Info diff --git a/tests/mysql.ini.tmpl b/tests/mysql.ini.tmpl index 10aa3cabb..15a7a379f 100644 --- a/tests/mysql.ini.tmpl +++ b/tests/mysql.ini.tmpl @@ -84,9 +84,8 @@ PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql/data/sessions [log] MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mysql-log -ROUTER = , -XORM = file ENABLE_SSH_LOG = true +logger.xorm.MODE = file [log.test] LEVEL = Info diff --git a/tests/mysql8.ini.tmpl b/tests/mysql8.ini.tmpl index 633644174..7d4c27c03 100644 --- a/tests/mysql8.ini.tmpl +++ b/tests/mysql8.ini.tmpl @@ -83,9 +83,8 @@ PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mysql8/data/sessions [log] MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}mysql8-log -ROUTER = , -XORM = file ENABLE_SSH_LOG = true +logger.xorm.MODE = file [log.test] LEVEL = Info diff --git a/tests/pgsql.ini.tmpl b/tests/pgsql.ini.tmpl index 2b54843c3..ee1373d71 100644 --- a/tests/pgsql.ini.tmpl +++ b/tests/pgsql.ini.tmpl @@ -87,9 +87,8 @@ PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/sessions [log] MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}pgsql-log -ROUTER = , -XORM = file ENABLE_SSH_LOG = true +logger.xorm.MODE = file [log.test] LEVEL = Info diff --git a/tests/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl index 546b27c5f..74e195711 100644 --- a/tests/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -82,9 +82,8 @@ PROVIDER_CONFIG = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/sessions [log] MODE = {{TEST_LOGGER}} ROOT_PATH = {{REPO_TEST_DIR}}sqlite-log -ROUTER = , -XORM = file ENABLE_SSH_LOG = true +logger.xorm.MODE = file [log.test] LEVEL = Info