[Rt-commit] rt branch, 4.4/silence-change-of-config-warnings, created. rt-4.4.2-87-g3bb31ddc2
Maureen Mirville
maureen at bestpractical.com
Mon Mar 5 15:01:09 EST 2018
The branch, 4.4/silence-change-of-config-warnings has been created
at 3bb31ddc23701883845411507821e14ab879decc (commit)
- Log -----------------------------------------------------------------
commit 3bb31ddc23701883845411507821e14ab879decc
Author: Maureen E. Mirville <maureen at bestpractical.com>
Date: Mon Jan 22 16:14:09 2018 -0500
Add option to silence 'Change of config' warnings
When an RTIR configuration option is updated in RT_SiteConfig.pm,
a warning message is added to the logs stating the update will
overwrite its default config option. The behavior the message is
expressing is expected if the change was intentional. This warning
message might not be very helpful to some users and it creates
additional noise in the logs. This warning message has been moved
to the debug level to allow users the option to view these messages
or not by enabling or disabling 'debug' with the RT config
$LogToSTDERR.
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index e73273012..c974b49ca 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -1643,7 +1643,7 @@ sub SetFromConfig {
# as a site config is loaded earlier then its base config
# then we warn only on different extensions, for example
# RTIR's options is set in main site config
- warn
+ our $ConfigChangeWarning =
"Change of config option '$name' at $args{'File'} line $args{'Line'} has been ignored."
." It may be ok, but we want you to be aware."
." This option has been set earlier in $source{'File'} line $source{'Line'}."
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index d7b736565..084386bdf 100644
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -90,6 +90,9 @@ die "Wrong version of RT $RT::VERSION found; need @RT_VERSION_MAJOR at .@RT_VERSION
RT->LoadConfig();
RT->InitPluginPaths();
RT->InitLogging();
+if ( $RT::Config::ConfigChangeWarning ) {
+ $RT::Logger->debug( $RT::Config::ConfigChangeWarning );
+}
require RT::Handle;
my ($integrity, $state, $msg) = RT::Handle->CheckIntegrity;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list