Writing to stdout will panic if the pipe is broken. This can happen, for example, if you run (in Linux):
nvim-gtk & exit
Then repeatedly hit <Tab> to make it print Event bell([]) to the (already closed) STDOUT. After a few tabs it'll crash - because it is trying to write to a broken pipe.
The macros from the log crate don't crash when the pipe is broken. It also makes more sense to use them, since these prints are not the actual output of the application.
Writing to
stdout
will panic if the pipe is broken. This can happen, for example, if you run (in Linux):Then repeatedly hit
<Tab>
to make it printEvent bell([])
to the (already closed)STDOUT
. After a few tabs it'll crash - because it is trying to write to a broken pipe.The macros from the
log
crate don't crash when the pipe is broken. It also makes more sense to use them, since these prints are not the actual output of the application.