darold / pgbadger

A fast PostgreSQL Log Analyzer
http://pgbadger.darold.net/
PostgreSQL License
3.51k stars 349 forks source link

Wrong progress bar formating, missing parameter to disable #702

Closed seidlmic closed 2 years ago

seidlmic commented 2 years ago

Hello, in case of forwarding output pf pgbadger into the file I get wrong, ugly formatting and there is also no parameter to turn it off.

DEBUG: Start parsing postgresql log at offset 0 of file "/home/vyvojar/pgbadger_pg_log/shkndb-rsd/postgresql-2021-11.log" to 1104637
[>                        ] Parsed       0 bytes of 1104637 (0.00%), queries: 0, events: 0^M[>                        ] Parsed    1567 bytes of 1104637 (0.14%), queries: 0, events: 0^M[>                        ] Parsed   15542 bytes of 1104637 (1.41%), queries: 0, events: 1^M[====>                    ] Parsed  211500 bytes of 1104637 (19.15%), queries: 0, events: 1^M[========================>] Parsed 1104637 bytes of 1104637 (100.00%), queries: 0, events: 11^M
DEBUG: the log statistics gathering took: 2 wallclock secs ( 0.08 usr  0.02 sys +  0.45 cusr  0.00 csys =  0.55 CPU)
darold commented 2 years ago

Use -q to disable the progress bar.

seidlmic commented 2 years ago

But -q param disables all output. I would like to disable only progress bar that causes bad formatted output into the file as shown above

darold commented 2 years ago

Commit fee7644 prints debug message (-v) when -q or --quiet is used.

seidlmic commented 2 years ago

Thanks for solution. Still some parameter like --no-progress-bar that will disable only progress bar will be useful for logging output.

darold commented 2 years ago

Commit f34d912 adds the --no-progressbar option.

seidlmic commented 2 years ago

you are great, thanks very much