Ticket #78 (closed enhancement: fixed)

Opened 4 years ago

Last modified 6 months ago

shepherd --quiet

Reported by: anonymous Owned by:
Priority: minor Milestone: 1.0
Component: Shepherd Version: 1.x
Keywords: TGCNvBWWnWQwYDLepj Cc:

Description

Shepherd seems to produce a lot of output even when using the --quiet option. As a result I get a nice email every morning from cron which is generally just routine component checking output. I don't mind redirecting STDOUT, but I'm not convinced shepherd should be writing to STDERR unless something is wrong. Please accept this quick hack for your consideration. Thanks.

--- shepherd.1.2.36.ori 2008-01-21 09:35:23.000000000 +1030
+++ shepherd    2008-01-21 09:53:09.000000000 +1030
@@ -176,7 +176,7 @@
 &description if ($opt->{description});

 $| = 1;
-print "$progname v$version ($^O)\n\n";
+print "$progname v$version ($^O)\n\n" unless ($opt->{quiet});

 exit if ($opt->{version});
 &help if ($opt->{help});
@@ -384,7 +384,7 @@
        }
     }

-    &log(2,sprintf  "* %-54s%17s\n",
+    &log(sprintf  "* %-54s%17s\n",
                    ucfirst($progtype) . " $proggy" .
                        ($ver ? " v$ver" : '') . "...",
                    $action);
@@ -1614,7 +1614,7 @@
     my $fn = shift;
     my $name = shift;

-    print "Reading $name file: $fn\n";
+    print "Reading $name file: $fn\n" unless ($opt->{quiet});
     unless (-r $fn)
     {
        unless ($opt->{configure})

Change History

Changed 4 years ago by paulx@…

  • status changed from new to closed
  • type changed from defect to enhancement
  • resolution set to fixed

Added in [1002]

Wasn't really a defect.

Got any other enhancements?

Changed 13 months ago by Hetty

  • keywords TGCNvBWWnWQwYDLepj added
  • milestone set to 1.0

That's raelly thinking out of the box. Thanks!

Changed 13 months ago by krzpcjvm

u90aN3 <a href="http://ufyxkpdrzqft.com/">ufyxkpdrzqft</a>

Changed 6 months ago by tramadol 000

Note: See TracTickets for help on using tickets.