mantil-io / mantil

Build your AWS Lambda-based Go backends quicker than ever
https://www.mantil.com
MIT License
109 stars 3 forks source link

Catch ctrl-c in cli #63

Closed ianic closed 3 years ago

ianic commented 3 years ago

Don't allow ctrl-c to kill cli. Catch it, log that it occurs, close resources (file system logs, nats connections, ...) and then exit. It's important that we log the occurrences of ctrl-c exists from mantil.

ianic commented 3 years ago

Catch also panic, log it then exit.

ianic commented 3 years ago

In the case of ctrl-c print current stack if possible. I'm interested where we stuck.