From 354354c274970ddc5e0a1d2f14169f31207ae58a Mon Sep 17 00:00:00 2001 From: Darold Gilles Date: Wed, 15 Aug 2012 00:16:34 +0200 Subject: [PATCH] The progress bar is now enabled by default, the -p option has been removed. Use -q | --quiet to disable it --- README | 4 +--- doc/pgBadger.pod | 4 +--- pgbadger | 9 +++------ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/README b/README index b1d540d..67cae72 100644 --- a/README +++ b/README @@ -32,9 +32,7 @@ SYNOPSIS -o | --outfile filename: define the filename for the output. Default depends of the output format: out.html or out.txt. To dump output to stdout use - as filename. - -p | --progress : show a progress bar, quiet mode is automaticaly - enabled with this option. - -q | --quiet : don't print anything to stdout. + -q | --quiet : don't print anything to stdout, even not a progress bar. -s | --sample number : number of query sample to store/display. Default: 3 -t | --top number : number of query to store/display. Default: 20 -T | --title string : change title of the HTML page report. diff --git a/doc/pgBadger.pod b/doc/pgBadger.pod index 916a439..76b0d3a 100644 --- a/doc/pgBadger.pod +++ b/doc/pgBadger.pod @@ -35,9 +35,7 @@ Options: -o | --outfile filename: define the filename for the output. Default depends of the output format: out.html or out.txt. To dump output to stdout use - as filename. - -p | --progress : show a progress bar, quiet mode is automaticaly - enabled with this option. - -q | --quiet : don't print anything to stdout. + -q | --quiet : don't print anything to stdout, even not a progress bar. -s | --sample number : number of query sample to store/display. Default: 3 -t | --top number : number of query to store/display. Default: 20 -T | --title string : change title of the HTML page report. diff --git a/pgbadger b/pgbadger index b9f6622..b080555 100755 --- a/pgbadger +++ b/pgbadger @@ -62,7 +62,7 @@ my $to = ''; my $regex_prefix_dbname = ''; my $regex_prefix_dbuser = ''; my $quiet = 0; -my $progress = 0; +my $progress = 1; my $error_only = 0; my @exclude_query = (); my $exclude_file = ''; @@ -108,7 +108,6 @@ my $result = GetOptions( "m|maxlength=i" => \$maxlength, "n|nohighlight!" => \$nohighlight, "o|outfile=s" => \$outfile, - "p|progress!" => \$progress, "q|quiet!" => \$quiet, "s|sample=i" => \$sample, "t|top=i" => \$top, @@ -163,7 +162,7 @@ if ($#log_files < 0) { } # Quiet mode is forced with progress bar -$quiet = 1 if ($progress); +$progress = 0 if ($quiet); # Set the default number minutes for queries and connections average $avg_minutes ||= 5; @@ -699,9 +698,7 @@ Options: -o | --outfile filename: define the filename for the output. Default depends of the output format: out.html or out.txt. To dump output to stdout use - as filename. - -p | --progress : show a progress bar, quiet mode is automaticaly - enabled with this option. - -q | --quiet : don't print anything to stdout. + -q | --quiet : don't print anything to stdout, even not a progress bar. -s | --sample number : number of query sample to store/display. Default: 3 -t | --top number : number of query to store/display. Default: 20 -T | --title string : change title of the HTML page report. -- 2.40.0