From: Darold Gilles Date: Tue, 14 Aug 2012 22:06:58 +0000 (+0200) Subject: Graphs are now generated by default for HTML output, option -g as been remove and... X-Git-Tag: v3.2~172 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16afea5255d120beebb07a044d99d2bee382618c;p=pgbadger Graphs are now generated by default for HTML output, option -g as been remove and option -G added to allow disabling graph generation. Request from Julien Rouhaud --- diff --git a/README b/README index 5f838c9..b1d540d 100644 --- a/README +++ b/README @@ -20,7 +20,7 @@ SYNOPSIS -d | --dbname database : only report what concern the given database -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog,stderr,csv. Default: stderr - -g | --graph : generate graphs using the Flotr2 javascript library + -G | --nograph : disable graphs on HTML output. Enable by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -l | --last-parsed file: allow incremental log parsing by registering the @@ -37,8 +37,10 @@ SYNOPSIS -q | --quiet : don't print anything to stdout. -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. -u | --dbuser username : only report what concern the given user -v | --verbose : enable verbose or debug mode. Disabled by default. + -V | --version : show pgBadger version and exit. -w | --watch-mode : only report errors just like logwatch could do. -x | --extension : output format. Values: text or html. Default: html -z | --zcat exec_path : set the full path to the zcat program. Use it if diff --git a/doc/pgBadger.pod b/doc/pgBadger.pod index 51ac199..916a439 100644 --- a/doc/pgBadger.pod +++ b/doc/pgBadger.pod @@ -23,7 +23,7 @@ Options: -d | --dbname database : only report what concern the given database -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog,stderr,csv. Default: stderr - -g | --graph : generate graphs using the Flotr2 javascript library + -G | --nograph : disable graphs on HTML output. Enable by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -l | --last-parsed file: allow incremental log parsing by registering the diff --git a/pgbadger b/pgbadger index 18b68e1..b9f6622 100755 --- a/pgbadger +++ b/pgbadger @@ -53,7 +53,8 @@ my $top = 0; my $sample = 0; my $extension = ''; my $maxlength = 0; -my $graph = 0; +my $graph = 1; +my $nograph = 0; my $debug = 0; my $nohighlight = 0; my $from = ''; @@ -100,7 +101,7 @@ my $result = GetOptions( "d|dbname=s" => \$dbname, "e|end=s" => \$to, "f|format=s" => \$format, - "g|graph!" => \$graph, + "G|nograph!" => \$nograph, "h|help!" => \$help, "i|ident=s" => \$ident, "l|last-parsed=s" => \$last_parsed, @@ -213,6 +214,7 @@ $outdir = $infs[1] . '/'; # Remove graph support if output is not html $graph = 0 if ($extension ne 'html'); +$graph = 0 if ($nograph); my $end_top = $top - 1; @@ -685,7 +687,7 @@ Options: -d | --dbname database : only report what concern the given database -e | --end datetime : end date/time for the data to be parsed in log. -f | --format logtype : possible values: syslog,stderr,csv. Default: stderr - -g | --graph : generate graphs using the Flotr2 javascript library + -G | --nograph : disable graphs on HTML output. Enable by default. -h | --help : show this message and exit. -i | --ident name : programname used as syslog ident. Default: postgres -l | --last-parsed file: allow incremental log parsing by registering the