I run a java application as a server on a EC2. But as I loose my ssh connection all console messages are also lost. When I redirect all messages to > my.log
and then use tail -f my.log
I dont get the e.printstacktrace
messages. I wonder what I can do.
Is there something simple that I can do, to relogin to ssh, find out which console the java application is throwing out all the messages.
So instead of doing a java myapp.jar &
, I now do a java myapp.jar
, so that I dont loose any console messages.
The other question is, Is there a better command than > my.log
that does not miss any message from my application, so that I can log, and do a tail -f my.log
?