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

Broken pipe when using | tee #31

Closed
jwilm opened this issue Oct 6, 2016 · 4 comments
Closed

Broken pipe when using | tee #31

jwilm opened this issue Oct 6, 2016 · 4 comments

Comments

@jwilm
Copy link
Contributor

jwilm commented Oct 6, 2016

I've been running a process into a | tee logfile; sending SIGINT will close everything down, but log4rs prints a bunch of this to stdout at that point:

log4rs: Broken pipe (os error 32)
log4rs: Broken pipe (os error 32)
log4rs: Broken pipe (os error 32)
log4rs: Broken pipe (os error 32)
log4rs: Broken pipe (os error 32)

This is on macOS and a few months old version of log4rs; haven't tested a newer version or different OS.

@sfackler
Copy link
Collaborator

sfackler commented Oct 7, 2016

I don't think log4rs is doing anything particularly interesting here. I'm guessing that SIGINTing the process group will sometimes kill the tee first so stdout breaks. The error logging goes to stderr which presumably wasn't redirected. I've been meaning to make the error logging configurable but haven't gotten around to it.

@sfackler
Copy link
Collaborator

Are there any actions to take here?

@jwilm
Copy link
Contributor Author

jwilm commented Oct 11, 2016

Hey sorry for not getting back to you. I guess if this is how things usually work, then there's no action needed. My application actually does a graceful shutdown on SIGINT so it's probably trying to log after the pipe is closed.

@jwilm jwilm closed this as completed Oct 11, 2016
@sfackler
Copy link
Collaborator

No problem! I filed #32 to track the meta-logger stuff.

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

No branches or pull requests

2 participants