[Rt-commit] rt branch, 4.2/rt-email-dashboards-log-option, created. rt-4.2.11-5-g98f970a

? sunnavy sunnavy at bestpractical.com
Wed Jun 10 10:39:44 EDT 2015


The branch, 4.2/rt-email-dashboards-log-option has been created
        at  98f970ab8dfcfd46a599ad3d76353f122537c6df (commit)

- Log -----------------------------------------------------------------
commit 98f970ab8dfcfd46a599ad3d76353f122537c6df
Author: Matt Zagrabelny <mzagrabe at d.umn.edu>
Date:   Wed Jun 10 08:55:53 2015 -0500

    add "log" CLI option to rt-email-dashboards
    
    Allow rt-email-dashboards to set its log level.

diff --git a/sbin/rt-email-dashboards.in b/sbin/rt-email-dashboards.in
index 1daba86..5573bc7 100644
--- a/sbin/rt-email-dashboards.in
+++ b/sbin/rt-email-dashboards.in
@@ -70,7 +70,7 @@ BEGIN { # BEGIN RT CMD BOILERPLATE
 my %opts;
 use Getopt::Long;
 GetOptions( \%opts,
-    "help|h", "dryrun", "time=i", "epoch=i", "all"
+    "help|h", "dryrun", "time=i", "epoch=i", "all", "log=s"
 );
 
 if ($opts{'help'}) {
@@ -86,6 +86,9 @@ RT::Interface::CLI->import(qw{ loc });
 # Load the config file
 RT::LoadConfig();
 
+# adjust logging to the screen according to options
+RT->Config->Set( LogToSTDERR => $opts{log} ) if $opts{log};
+
 # Connect to the database and get RT::SystemUser and RT::Nobody loaded
 RT::Init();
 
@@ -156,6 +159,10 @@ Back-compat for --time SECONDS.
 Ignore subscription frequency when considering each dashboard (should only be
 used with --dryrun for testing and debugging)
 
+=item --log LEVEL
+
+Adjust LogToSTDERR config option
+
 =back
 
 =cut

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


More information about the rt-commit mailing list