patator icon indicating copy to clipboard operation
patator copied to clipboard

Quiet Mode

Open ldv8434 opened this issue 2 years ago • 0 comments

Changes

  • Non-critical-error output is moved from stderr to stdout
    • FAIL actions were being logged at "Error" level, but do not halt patator execution, so they are also moved to stdout.
    • Anything logged as logging.CRITICAL level will continue to go to stderr to make future development easier.
  • A new flag (-q) will suppress non-critical-error output.
    • Only stdout is affected. All other forms of output are untouched.

Rationale

This is partially in response to #60 and partially for my company's own use in automating use of Patator.
The workaround suggested in the linked issue is to pipe stderr to /dev/null and use one of the other flags to write to an output file. This does solve the problem, but it also creates the issue of "hiding" critical errors.
This change keeps errors visible and makes working with command-line output easier by writing to the dedicated stdout stream.

ldv8434 avatar May 06 '22 22:05 ldv8434