Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#78 closed enhancement (fixed)

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 (4)

comment:1 Changed 15 years ago by paulx@…

Resolution: fixed
Status: newclosed
Type: defectenhancement

Added in [1002]

Wasn't really a defect.

Got any other enhancements?

comment:2 Changed 12 years ago by Hetty

Keywords: TGCNvBWWnWQwYDLepj added
Milestone: 1.0

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

comment:3 Changed 12 years ago by krzpcjvm

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

comment:4 Changed 12 years ago by tramadol 000

Note: See TracTickets for help on using tickets.