[Rt-commit] rt branch, 4.2/rename-uses-of-logtoscreen, created. rt-4.1.8-301-g052e462

Alex Vandiver alexmv at bestpractical.com
Fri May 10 00:25:37 EDT 2013


The branch, 4.2/rename-uses-of-logtoscreen has been created
        at  052e462c056cce039ff8074828aa93e81c91bf46 (commit)

- Log -----------------------------------------------------------------
commit 052e462c056cce039ff8074828aa93e81c91bf46
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri May 10 00:12:38 2013 -0400

    Replace uses of the now-deprecated LogToScreen with LogToSTDERR
    
    In 9ee4377, the configuration option LogToScreen was renamed to
    LogToSTDERR to better describe what it does, and most existing instances
    of LogToScreen were renamed.  Recently, 7df7a81 switched to using
    RT->Deprecated to warn about it -- and in doing so, dropped the
    restriction that the Set( LogToScreen ) must be called from a
    configuration file.  This exposed several pieces of code (most of which
    were added or merged after 9ee4377) which still attempt to
    RT->Config->Set( LogToScreen ), leading to deprecation warnings.
    
    Avoid the deprecation warnings by switching all new uses of LogToScreen
    to the correct LogToSTDERR name instead.

diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 9448a28..959622f 100644
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -98,7 +98,7 @@ GetOptions(
 RT::LoadConfig();
 
 # adjust logging to the screen according to options
-RT->Config->Set( LogToScreen => $log ) if $log;
+RT->Config->Set( LogToSTDERR => $log ) if $log;
 
 #Connect to the database and get RT::SystemUser and RT::Nobody loaded
 RT::Init();
@@ -334,7 +334,7 @@ sub help {
       . loc( "[_1] - Specify the comma separated list of transactions' types you want to use", "--transaction-type" )
       . "\n";
     print "        "
-      . loc( "[_1] - Adjust LogToScreen config option", "--log" ) . "\n";
+      . loc( "[_1] - Adjust LogToSTDERR config option", "--log" ) . "\n";
     print "        "
       . loc( "[_1] - Output status updates to STDOUT", "--verbose" ) . "\n";
     print "\n";
@@ -450,7 +450,7 @@ Specify the comma separated list of transactions' types you want to use
 
 =item log
 
-Adjust LogToScreen config option
+Adjust LogToSTDERR config option
 
 =item verbose
 
diff --git a/etc/upgrade/sanity-check-stylesheets.pl b/etc/upgrade/sanity-check-stylesheets.pl
index cd290e6..aa4faaf 100644
--- a/etc/upgrade/sanity-check-stylesheets.pl
+++ b/etc/upgrade/sanity-check-stylesheets.pl
@@ -50,7 +50,7 @@ use warnings;
 
 use RT;
 RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
+RT->Config->Set('LogToSTDERR' => 'debug');
 RT::Init();
 
 $| = 1;
diff --git a/etc/upgrade/switch-templates-to.in b/etc/upgrade/switch-templates-to.in
index d5c75c5..99999d9 100644
--- a/etc/upgrade/switch-templates-to.in
+++ b/etc/upgrade/switch-templates-to.in
@@ -67,7 +67,7 @@ if ($to =~ /html|text/i) {
 }
 
 RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'info');
+RT->Config->Set('LogToSTDERR' => 'info');
 RT::Init();
 
 $| = 1;
diff --git a/etc/upgrade/time-worked-history.pl b/etc/upgrade/time-worked-history.pl
index 77b954d..e794c40 100644
--- a/etc/upgrade/time-worked-history.pl
+++ b/etc/upgrade/time-worked-history.pl
@@ -52,7 +52,7 @@ use warnings;
 
 use RT;
 RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'info');
+RT->Config->Set('LogToSTDERR' => 'info');
 RT::Init();
 
 my $dbh = $RT::Handle->dbh;
diff --git a/etc/upgrade/upgrade-articles.in b/etc/upgrade/upgrade-articles.in
index 6e8d1d7..520e69f 100644
--- a/etc/upgrade/upgrade-articles.in
+++ b/etc/upgrade/upgrade-articles.in
@@ -54,7 +54,7 @@ use lib "@RT_LIB_PATH@";
 
 use RT;
 RT::LoadConfig();
-RT->Config->Set('LogToScreen' => 'debug');
+RT->Config->Set('LogToSTDERR' => 'debug');
 RT::Init();
 
 $| = 1;
diff --git a/sbin/rt-clean-sessions.in b/sbin/rt-clean-sessions.in
index 3052966..b8970e9 100644
--- a/sbin/rt-clean-sessions.in
+++ b/sbin/rt-clean-sessions.in
@@ -95,9 +95,9 @@ require RT;
 RT::LoadConfig();
 
 if( $opt{'debug'} ) {
-    RT->Config->Set( LogToScreen => 'debug' );
+    RT->Config->Set( LogToSTDERR => 'debug' );
 } else {
-    RT->Config->Set( LogToScreen => undef );
+    RT->Config->Set( LogToSTDERR => undef );
 }
 
 RT::ConnectToDatabase();
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index 910bfe9..2c9699c 100644
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -97,9 +97,9 @@ RT->InitClasses();
 
 # Force warnings to be output to STDERR if we're not already logging
 # them at a higher level
-RT->Config->Set( LogToScreen => 'warning')
-    unless ( RT->Config->Get( 'LogToScreen' )
-             && RT->Config->Get( 'LogToScreen' ) =~ /^(debug|info|notice)$/ );
+RT->Config->Set( LogToSTDERR => 'warning')
+    unless ( RT->Config->Get( 'LogToSTDERR' )
+             && RT->Config->Get( 'LogToSTDERR' ) =~ /^(debug|info|notice)$/ );
 
 # get customized root password
 my $root_password;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list