All Versions
5
Latest Version
Avg Release Cycle
208 days
Latest Release
1385 days ago

Changelog History

  • v3.0.2 Changes

    July 05, 2020
    • ✂ Remove vendor folder and move to go.mod
    • ✂ Remove dependency on seelog for tests
    • ⚡️ update dependencies
    • ⚡️ update go version to 1.14 in travis
  • v3.0.1 Changes

    June 28, 2018

    🛠 Fixes gopkg import bug where deathlog was importing from master in the versioned gopkg.in import. Now death exists in a single package for import.

  • v3.0 Changes

    June 27, 2018

    🚀 This release removes all external dependencies to a logger. Now by default death will not log anything but supports using your own custom logger. To use the logger satisfy the deathlog.Logger interface.

    🚀 Also included with this release is the ability to check for errors from the closers being closed. If death fails to close all the closers, or if several closers return an error, the errors will be concatenated and bubbled up to the caller of death.WaitForDeath(closers...). See the example below:

    func main() { death := DEATH.NewDeath(SYS.SIGINT, SYS.SIGTERM) //pass the signals you want to end your applicationobjects := make([]io.Closer, 0) objects = append(objects, &NewType{}) // this will work as long as the type implements a Close method//when you want to block for shutdown signalserr := death.WaitForDeath(objects...) // this will finish when a signal of your type is sent to your applicationif err != nil { log.Println(err) os.Exit(1) } }type NewType struct { }func (c \*NewType) Close() error { return fmt.Errorf("an error") }
    
  • v2.0 Changes

    March 27, 2018

    🚀 This release encompasses a compatibility change for integrating with logrus. Logrus and seelog are incompatible loggers so we need a new major version in order to use one or the other.

    👀 Specifically this Logger interface that seelog uses:

    type Logger interface { Error(v ...interface{}) errorDebug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) error}
    

    is incompatible with the interface that logrus uses:

    type Logger interface { Error(v ...interface{}) Debug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) }
    

    As such we need to version death depending on the logger you are using.

    🚀 With this release you should be importing Death using gopkg.in with the version you want. See the Readme for more details on how to import the different versions.

    🏗 This also contains a quality of life fix for the builder pattern with SetTimeout and SetLogger. Both of those functions will now return the death object so you can chain function calls.

  • v1.0 Changes

    March 27, 2018

    🚀 This release is for backwards compatibility based on using a logger subscribing to the following interface:

    type Logger interface { Error(v ...interface{}) errorDebug(v ...interface{}) Info(v ...interface{}) Warn(v ...interface{}) error}
    

    👀 A popular logging library you can plugin here is https://github.com/cihub/seelog.