When in bash I can run:
java -jar server.jar &>> log.txt
And it combines the stdout and stderr into log.txt
. However when I have this line in my Upstart .conf
file, it does not do this:
exec java -jar server.jar &>> log.txt
I’ve also tried separating the logs as:
exec java -jar server.jar >> log.txt 2>> err.txt
And this doesn’t work either. It will work if I make it overwrite instead of append, e.g.
exec java -jar server.jar > log.txt 2> err.txt
But this is not acceptable. Is this a bug in Upstart or is there something I’m misunderstanding? I’m running Ubuntu 14.04.2 LTS, Upstart version 1.12.1, and I’m fairly new to both.