Commit Graph

4 Commits

Author SHA1 Message Date
Toby c8b0c0e43b
Fixing import for airbrake and adding build constraint to example hook 2016-07-27 13:12:26 +01:00
Aaron Greenlee 357c4eae02 Revised import path of logrus for pull-request CI 2016-06-24 10:49:02 -04:00
Aaron Greenlee ff52e76f67 Go fmt alt exit addition 2016-06-24 10:24:56 -04:00
Aaron Greenlee a7755c5c03 Enhanced fatal calls so exit handlers can be invoked
While GO offers the ability to recover from panic there is no way to intercept an os.Exit event. To allow graceful shutdown and clean-up or programs which use Logrus to Fatal out I've borrowed ideas from the `atexit` package and enhanced Logrus.

Usage:
* When setting up the logger one call `RegisterExitHandler( func() {...} )` to add a handler that will be invoked for any `Fatal` call to the logger.
2016-06-24 10:23:56 -04:00