core_d.js icon indicating copy to clipboard operation
core_d.js copied to clipboard

Way to send server errors to stderr?

Open fsouza opened this issue 2 years ago • 1 comments

As of #26, we can now write client errors to stderr, but server errors are still written to stdout because they're written to a single stream (the socket stream).

The idea is that we should be able to tell the client to write this string to stderr instead of stdout: https://github.com/mantoni/core_d.js/blob/05990e76214a2afd561994ddf025db6b608ee554/lib/server.js#L88

In order to support that, I imagine that we'd need to add some structure to what gets written in the connection (which would be yet another breaking change). We can probably make it backwards compatible though (at least for people using the node.js client, folks manually connecting to the TCP socket would have a harder time). What do you think?

fsouza avatar Nov 10 '23 03:11 fsouza

I just released v6.1.0 with a change from @amritk which adds a debug flag to log child process output to the console (see #27). Does this help with your issue?

mantoni avatar Nov 10 '23 07:11 mantoni