This is causing problems:
node "$SUMAN_PROJECT_ROOT/server.js" | bunyan -o short &> ${LOG_FILE} &
this works:
node "$SUMAN_PROJECT_ROOT/server.js" &> ${LOG_FILE} &
the problem is that with the first command, the output is not being sent to the file. In the second command, it does get sent to the file. Why might it be the case the first command does not work - I would expect it would send the output to the file just like the second command. The bunyan command should act like grep, just filter and mapping the output from the node command.
My editor does not like a proposed solution:
|
to&|
and see the question I've linked for why. – Wildcard Sep 06 '17 at 04:20|
and the&>
are for, and just trust that it will all work somehow, that's called "cargo cult programming." It is important to understand fully what the code does that you write. I don't really mean to criticize you; I'm glad you came to this site, because "cargo cult" describes about 99% of the production shell code I've seen. So it's not just you. :) – Wildcard Sep 06 '17 at 06:09&|
– Alexander Mills Sep 06 '17 at 06:232>&1 |
– Chris Davies Sep 06 '17 at 10:51