You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results in this output when run in the Cygwin terminal, and trying to have the bunyan CLI tool format the output:
$ node test.js | bunyan
* * *
events.js:72
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at errnoException (net.js:901:11)
at Socket._write (net.js:643:26)
at doWrite (_stream_writable.js:221:10)
at writeOrBuffer (_stream_writable.js:211:5)
at Socket.Writable.write (_stream_writable.js:180:11)
at Socket.write (net.js:613:40)
at Logger._emit (T:\eleven\eleven-throwaway-server\node_modules\bunyan\lib\bunyan.js:742:22)
at Logger.info (T:\eleven\eleven-throwaway-server\node_modules\bunyan\lib\bunyan.js:819:24)
at null._onTimeout (T:\eleven\eleven-throwaway-server\test.js:2:29)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
It seems like the bunyan process exits immediately (after printing the * * *), so the log statement fails to write to STDOUT.
FWIW, the same example works just fine in the standard Windows shell on the same machine. Piping the output into something else (like less) works fine, too.
The text was updated successfully, but these errors were encountered:
Hmm... When I comment out the uncaughtException handler in bunyan, it prints this:
Error: EINVAL, invalid argument
at new Socket (net.js:157:18)
at process.stdin (node.js:660:19)
at processStdin ([...]\npm\node_modules\bunyan\bin\bunyan:997:24)
at main ([...]\npm\node_modules\bunyan\bin\bunyan:1496:9)
at Object.<anonymous> ([...]\npm\node_modules\bunyan\bin\bunyan:1515:5)
[...]
Googling that leads to nodejs/node-v0.x-archive#6459, so this problem seems to be way outside the scope of Bunyan. Feel free to close the issue; I would be happy if there was some sort of workaround, though.
Happy to accept a work around PR that doesn't loose the uncaughtException handler facility for other platforms. However, given that this is a node core issue (not supporting cygwin), I'm closing this for now.
Apologies in advance if this turns out to be a Cygwin issue, rather than a Bunyan bug.
Running the following simple test program:
Results in this output when run in the Cygwin terminal, and trying to have the
bunyan
CLI tool format the output:It seems like the
bunyan
process exits immediately (after printing the * * *), so the log statement fails to write to STDOUT.FWIW, the same example works just fine in the standard Windows shell on the same machine. Piping the output into something else (like
less
) works fine, too.The text was updated successfully, but these errors were encountered: