bashflutterflutter-pub

How to log the entire verbose output of flutter pub publish -v?


When running flutter pub publish -v you can see the verbose output in the console, but it's very long, too long for most Terminal buffers.

The binary seems to bypass the stdout on verbose text, so how can I log the entirety of the command into a file, piping seems not to work:

flutter pub publish -v > ./publish.log # will only contain the normal output

I also tried to use tee without success.


Solution

  • Revisiting my old question, pretty sure the answer is to redirect the stderr to stdout:

    flutter pub publish -v > ./publish.log &2>1