coreos-installer icon indicating copy to clipboard operation
coreos-installer copied to clipboard

default to stderr or stdout for log/print messages

Open dustymabe opened this issue 5 years ago • 1 comments

Carried forward from the conversation in https://github.com/coreos/coreos-installer/pull/212#discussion_r408668498

Basically should we default to printing messages to stdout or stderr? Discuss!

dustymabe avatar Apr 15 '20 18:04 dustymabe

My personal suggestion is to expand @bgilbert and @cgwalters hints there and:

  • switch all the eprintln to log statements, then have the logger setup where they should go (usual default is stderr)
  • push up the few println in here and return datastructures instead, so that logic can accommodate other output formats/targets too
  • this leaves us with the progress bar, for which I don't have good ideas other than a silencing flag (linked to the above)

lucab avatar Apr 23 '20 09:04 lucab