Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use error!/warn! logs instead of println! #84

Merged
merged 1 commit into from
Apr 1, 2018

Conversation

idanarye
Copy link
Contributor

@idanarye idanarye commented Apr 1, 2018

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.

@daa84 daa84 merged commit e67e036 into daa84:master Apr 1, 2018
@daa84
Copy link
Owner

daa84 commented Apr 1, 2018

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants