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

FR: add an option controlling how to deal with stderr #689

Open
zhangyoufu opened this issue May 23, 2024 · 1 comment
Open

FR: add an option controlling how to deal with stderr #689

zhangyoufu opened this issue May 23, 2024 · 1 comment

Comments

@zhangyoufu
Copy link

In PR #144, cmd.Output() was changed to cmd.CombinedOutput() which captures stderr along with stdout.

However, not every use case benefits from capturing stderr and send out in http body. Stderr is usually being used as the destination for debugging logs/messages. Unexpected output from stderr may disturb stdout and does not match the expected Content-Type of http response body. Many script language may output traceback and relevant source code lines when an exception occurred, and it may not be very obvious how to avoid the leak.

I would like to see an option controlling whether stderr will be captured along with stdout. When not captured, only stdout from hook executables will be sent as http body, and stderr just inherit from webhook (or captured by webhook and output with structured logging, maybe another option).

@lovette
Copy link

lovette commented Aug 20, 2024

I just came across this project and it's saved me hours of work! I would have found it sooner but searching for "webhook" shows a lot of results 😁 This issue is at the top of my wish list, as I'd like to respond with one thing and write something else to the log.

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