usgs / groundmotion-processing

Parsing and processing ground motion data
Other
54 stars 42 forks source link

gmrecords --quiet still writes a lot of information to stdout #886

Closed baagaard-usgs closed 2 years ago

baagaard-usgs commented 2 years ago

Description

The gmrecords --quiet command line argument description says it will eliminate all output except error messages; however, this is far from reality.

Expected behavior

Running gmrecords with the --quiet command line argument will only write error messages to the screen.

Proposed solution

Convert current print() statements writing information messages to logging. This looks to be a combination of stuff in gmrecords.py and in the subcommand files. There might be a small number of deeply buried print() statements.

baagaard-usgs commented 2 years ago

@emthompson-usgs I don't understand why we always have stream logging enabled. My suggestion is that we turn off stream logging if a log file is specified. I think this is the behavior users will expect.

emthompson-usgs commented 2 years ago

I just like to always see the log output even if I'm logging to a file. This is just a personal preference. I thin it is because I rarely use the log file and I think of it as a back up record. But this proposed behavior is fine with me and probably more standard.