From: Darold Gilles Date: Wed, 17 Dec 2014 22:47:29 +0000 (+0100) Subject: Add --noreport command line option to intruct pgbadger to not build any reports in... X-Git-Tag: v6.3~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd1efd7a6cb7b365c2995eb6001ab1c13c0adbd4;p=pgbadger Add --noreport command line option to intruct pgbadger to not build any reports in incremental mode. pgBadger will only create binary files. Thanks to hubert Depesz Lubaczewski for the feature request. --- diff --git a/pgbadger b/pgbadger index 96706ed..c8b537a 100755 --- 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 = ();