Skip to content

Any way to detect the closing of stdout to disable the stdout sink? #87

Answered by SpriteOvO
Ymif-Jordan asked this question in Q&A
Discussion options

You must be logged in to vote

I have opened a PR #88 to fix the panic, could you test if it works for you?

However, in your case, each log will still do an absolute failure stdio write, which will have some performance overhead. And I suspect there's no clean way to detect broken stdio. If I were you, I would make a systemd service for this program and just do systemctl status my-program or journalctl -ru my-program to monitor its startup logging.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Ymif-Jordan
Comment options

@Ymif-Jordan
Comment options

@SpriteOvO
Comment options

@SpriteOvO
Comment options

Answer selected by Ymif-Jordan
@Ymif-Jordan
Comment options

@SpriteOvO
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants