Wednesday 19 June 2019

Can a node process intercept all of its stdout?

I know it's possible to intercept console logs using like so. But this and other things I've tried only seem to work on console logs. I'm using child_process.spawn to run a docker image and have {stdio: "inherit"} in order to get one of the processes inside the container to run properly (basically tricking it into thinking that it's running in a TTY). I'd like to be able to capture the output from the child process but I'm not sure if that's even possible.

Submitted June 19, 2019 at 09:28AM by neuromancering

No comments:

Post a Comment