Skip to content

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

Open
@zhangyoufu

Description

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions