linux - Is there any efficient way to get panic log of Go program under Unix easily? -


since i'm running go program server, need mechanism catch panic log if goes wrong later analyze & debug. there efficient way panic log of go program under unix easily? can guys introduce experience this? :)

i notification on phone of fatal panics on go programs. here's how:

first, run under daemontools (or similar) it's monitored , restart on failure.

then, log syslog using built-in log package. syslog forwards papertrail can review state of things, set alerts, etc... here forward undesirable event notifications email address , notifymyandroid can made aware of problems, search similar recent issues, @ context around problems, etc...

...but can't log own uncaught fatal panic, wrote logexec execute program , log stdout , stderr separately along unsuccessful exit notification.

example:

logexec -tag myprogram /path/to/myprogram -and -its arguments 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -