[Rt-commit] rt branch, 4.2/migrate-logging, created. rt-4.2.1-43-g892d372
Kevin Falcone
falcone at bestpractical.com
Wed Nov 27 18:22:51 EST 2013
The branch, 4.2/migrate-logging has been created
at 892d3721fe9cc9338e63c5135e9ff4ad7f7097e3 (commit)
- Log -----------------------------------------------------------------
commit 892d3721fe9cc9338e63c5135e9ff4ad7f7097e3
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Nov 27 18:18:09 2013 -0500
Setting $RT::LogToScreen doesn't change logging
While RT->Config->Set('LogToScreen','error') sets $RT::LogToScreen for
backcompat, we don't read from $RT::LogToScreen when calling
RT->Config->Get('LogToScreen');
This exposes a number of suppressed warnings when running rt-serializer
against 4.2-trunk.
LogToScreen is deprecated for LogToSTDERR.
Case sensitive search by Groups.Domain
Use of RT::Tickets::_SQLLimit in Queue.pm
Since parts of this need to go back into rtx-migrate and we need to
maintain backcompat in rt-serializer as much as possible (for
incremental upgrades) cleanup of these will come in separate commits.
diff --git a/lib/RT/Migrate.pm b/lib/RT/Migrate.pm
index baa7840..c87b466 100644
--- a/lib/RT/Migrate.pm
+++ b/lib/RT/Migrate.pm
@@ -176,11 +176,20 @@ sub progress {
sub setup_logging {
my ($dir, $file) = @_;
- $RT::LogToScreen = 'warning';
- $RT::LogToFile = 'warning';
- $RT::LogDir = $dir;
- $RT::LogToFileNamed = $file;
- $RT::LogStackTraces = 'error';
+
+ if ( RT->can('Config') && RT->Config->can('Set') ) {
+ RT->Config->Set(LogToScreen => 'warning');
+ RT->Config->Set(LogToFile => 'warning');
+ RT->Config->Set(LogDir => $dir);
+ RT->Config->Set(LogToFileNamed => $file);
+ RT->Config->Set(LogStackTraces => 'error');
+ } else { # running before 3.8
+ $RT::LogToScreen = 'warning';
+ $RT::LogToFile = 'warning';
+ $RT::LogDir = $dir;
+ $RT::LogToFileNamed = $file;
+ $RT::LogStackTraces = 'error';
+ }
undef $RT::Logger;
RT->InitLogging();
-----------------------------------------------------------------------
More information about the rt-commit
mailing list