[Rt-commit] rt branch, 5.0-trunk, updated. rt-5.0.1-442-gc572ca6beb
Jim Brandt
jbrandt at bestpractical.com
Fri Jun 11 14:39:21 EDT 2021
The branch, 5.0-trunk has been updated
via c572ca6beb9950ae209d89ec5e326f0356f4ce23 (commit)
via 9cf820b39cf7b41f9d29c5b453c206fe04c4a75c (commit)
from aa9732fc3c82f92a3d33782019ce63f3c6cd2891 (commit)
Summary of changes:
lib/RT/Config.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 9cf820b39cf7b41f9d29c5b453c206fe04c4a75c
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Sun Nov 29 18:43:00 2020 -0600
Log database config overrides via PreInitLoggerMessages
If a configuration change in the database overrides one in
RT_SiteConfig, a message is logged at the warn level to note
the override. This can cause unwanted logging for command-line
scripts in cron like rt-fulltext-indexer if a user updates a config
setting via the web UI and overrides a file setting.
Add the message to PreInitLoggerMessages to log at debug instead.
The message is still available to an admin debugging a config
issue, but is suppressed for common production log levels like warn.
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 59ce078f1c..e43531eb0e 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -2669,7 +2669,9 @@ sub LoadConfigFromDatabase {
if ($meta->{'Source'}) {
my %source = %{ $meta->{'Source'} };
if ($source{'SiteConfig'} && $source{'File'} ne 'database') {
- warn("Change of config option '$name' at $source{File} line $source{Line} has been overridden by the config setting from the database. Please remove it from $source{File} or from the database to avoid confusion.");
+ push @PreInitLoggerMessages,
+ "Change of config option '$name' at $source{File} line $source{Line} has been overridden by the config setting from the database. "
+ ."Please remove it from $source{File} or from the database to avoid confusion.";
}
}
commit c572ca6beb9950ae209d89ec5e326f0356f4ce23
Merge: aa9732fc3c 9cf820b39c
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Jun 11 14:19:18 2021 -0400
Merge branch '5.0/add-configuration-warnings-to-preinit-logger-messages' into 5.0-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list