Last active
October 16, 2015 00:41
-
-
Save philipithomas/c50e20f2978013cac85d to your computer and use it in GitHub Desktop.
Tech bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goal: write Julia logs to disk and also print to standard out. | |
# In the process, prepend environment info (staffjoy-scheduler-stage) | |
# This works in vagrant / dev | |
/usr/bin/julia -p 2 -e 'import Manager; Manager.run_server()' 2>&1 | awk -v env=$ENV '{ print "staffjoy-scheduler-" env, $0; }' | tee -a scheduler.log | |
# In docker, the awk fails. The environment variable is defined. | |
# This is all that works in docker: | |
/usr/bin/julia -p 2 -e 'import Manager; Manager.run_server()' 2>&1 | tee -a scheduler.log | |
# This writes to raw.log but not scheduler.log | |
/usr/bin/julia -p 2 -e 'import Manager; Manager.run_server()' 2>&1 | tee -a raw.log | awk -v env=$ENV '{ print "staffjoy-scheduler-" env, $0; }' | tee -a scheduler.log | |
# Why can't I get awk to work in docker? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment