]> granicus.if.org Git - pgbadger/commitdiff
Add --noreport command line option to intruct pgbadger to not build any reports in...
authorDarold Gilles <gilles@darold.net>
Wed, 17 Dec 2014 22:47:29 +0000 (23:47 +0100)
committerDarold Gilles <gilles@darold.net>
Wed, 17 Dec 2014 22:47:29 +0000 (23:47 +0100)
pgbadger

index 96706ed8895b97444717b7e4244fe457f8ffd7c6..c8b537aeba9c7fe609e143cb30dbff786328ad65 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -233,6 +233,7 @@ my $retention               = 0;
 my $bar_graph               = 0;
 my $dns_resolv              = 0;
 my $nomultiline             = 0;
+my $noreport                = 0;
 
 my $NUMPROGRESS = 10000;
 my @DIMENSIONS  = (800, 300);
@@ -378,6 +379,7 @@ my $result = GetOptions(
         'ssh-timeout=i'            => \$ssh_timeout,
        'anonymize!'               => \$anonymize,
        'noclean!'                 => \$noclean,
+       'noreport!'                => \$noreport,
 );
 die "FATAL: use pgbadger --help\n" if (not $result);
 
@@ -1320,7 +1322,7 @@ if (!$incremental && ($#given_log_files >= 0) ) {
                $fh->close();
        }
 
-} else {
+} elsif (!$incremental || !$noreport) {
 
        # Build a report per day
        my %weeks_directories = ();