openbmc-tools icon indicating copy to clipboard operation
openbmc-tools copied to clipboard

openbmctool: Eliminate extraneous output

Open micwalsh opened this issue 6 years ago • 3 comments

openbmctool.py produces output that amounts to clutter when it is unwanted. Example: Attempting login... User root has been logged out

Can you change it to NOT produce extra output. You could offer a "verbose" parm so you could see such output when it is desired.

micwalsh avatar Sep 25 '18 20:09 micwalsh

To be more clear, the reason this matters is that I use the output in programs and I'm forced to add code to remove this extra output.

micwalsh avatar Sep 25 '18 20:09 micwalsh

@micwalsh As a temporary work around, If you run with the -j flag it provides JSON output that is much more suited for programmatic parsing. I also propose to adding a --dataOnly option for providing the human readable output with only the data needed.

thalerj avatar Sep 26 '18 14:09 thalerj

@thalerj it is typical of command line tools to only output their data under normal circumstances and nothing further. Usually extra output is hidden behinda --verbose flag. I suggest you take that approach here.

amboar avatar Sep 26 '18 21:09 amboar