From 9f7aed46e44651a7679c35ae7c276d9e435004fc Mon Sep 17 00:00:00 2001 From: Beth Skurrie Date: Tue, 29 Mar 2022 16:57:17 +1100 Subject: [PATCH] feat: change sql_log_level default from debug to none When setting the log level to debug, the sql_log_level generally has to be set to none explicitly to avoid noisy SQL logs. Defaulting to none is a more user friendly option. --- docs/CONFIGURATION.md | 2 +- docs/configuration.yml | 2 +- .../config/runtime_configuration_database_methods.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index 3990b48c6..f0eee7ea3 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -157,7 +157,7 @@ To disable noisy SQL query logging when the application `log_level` is set to `d **Environment variable name:** `PACT_BROKER_SQL_LOG_LEVEL`
**YAML configuration key name:** `sql_log_level`
-**Default:** `debug`
+**Default:** From 2.99+, the default is `none`. In previous versions, the default is `debug`.
**Allowed values:** `none`, `debug`, `info`, `warn`, `error`, `fatal`
### sql_log_warn_duration diff --git a/docs/configuration.yml b/docs/configuration.yml index 0c9e43c90..1824cd925 100644 --- a/docs/configuration.yml +++ b/docs/configuration.yml @@ -97,7 +97,7 @@ groups: The log level that will be used when the SQL query statements are logged. To disable noisy SQL query logging when the application `log_level` is set to `debug` for other reasons, use the value `none`. - default_value: debug + default_description: From 2.99+, the default is `none`. In previous versions, the default is `debug`. allowed_values: - none - debug diff --git a/lib/pact_broker/config/runtime_configuration_database_methods.rb b/lib/pact_broker/config/runtime_configuration_database_methods.rb index d22d21924..d9795a323 100644 --- a/lib/pact_broker/config/runtime_configuration_database_methods.rb +++ b/lib/pact_broker/config/runtime_configuration_database_methods.rb @@ -16,7 +16,7 @@ def self.included(anyway_config) database_port: nil, database_url: nil, database_sslmode: nil, - sql_log_level: :debug, + sql_log_level: :none, sql_log_warn_duration: 5, sql_enable_caller_logging: false, database_max_connections: nil,