iperf
iperf copied to clipboard
Verbose output (--verbose) breaks JSON output (--json)
Context
- Version of iperf3: 3.11
- Hardware: ODROID-C2
- Operating system (and distribution, if any): Linux (Ubuntu 20.04 LTS)
- Other relevant information (for example, non-default compilers, libraries, cross-compiling, etc.): N/A
Bug Report
- Expected Behavior
With
--json
specified, the output of STDOUT should be working JSON - Actual Behavior
With
--verbose
in conjunction with--json
, the verbose output messages are sent to STDOUT along with JSON, breaking JSON - Steps to Reproduce
iperf3 --client XXX ... --verbose --json
- Possible Solution
Output verbose messages to STDERR (at least when
--json
is used also).
On one hand, this behavior shouldn't be a surprise because iperf3 prints this warning if you try to use those two features together:
warning: Verbose output (-v) may interfere with JSON output (-J)
On the other hand it'd probably be good if iperf3 didn't do that.
Can't the debug output be outputted to STDERR to resolve this?