Allow real-time streaming of stdout and stderr #80
Replies: 1 comment 1 reply
-
|
See some of my concerns with supporting this here: #59 (comment) The tl;dr is that, even if I were to support it, it likely wouldn't be through a multi-writer, because this would actually break stdout/stderr which is currently used for other purposes, depending on what the user passes in to other arguments (e.g. streaming of data to stdout through I am likely going to support it, but it's low on my priority list at the moment. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm currently working with this lib and I've found a problem that, the
Command.Runbuffers all output from the process and makes it available only after the command completes. This prevents applications from accessing the output stream in real-time, which is essential for real-time logging.I propose adding a mechanism to stream
stdoutandstderrto custom destinations. My proposed changes are as follows:stdoutandstderrio.Writerfields to theCommandstruct.SetStdout(io.Writer)andSetStderr(io.Writer), to allow configuration for custom writers.runWithResultmethod, useio.MultiWriterto direct the process output to multiple destinations.This change provides greater flexibility and real-time interactivity. I'm opening this discussion to discuss the solution.
Beta Was this translation helpful? Give feedback.
All reactions