hooks: add airbrake hook

hooks: Add airbrake hook

examples: move around to avoid overloading main

airbarke move around

remove tex.tgo

readme: cleanup

readme: try something different
This commit is contained in:
Simon Eskildsen
2014-04-13 18:17:20 -04:00
parent b73d08314f
commit d4f08ce128
6 changed files with 175 additions and 46 deletions
+29
View File
@@ -0,0 +1,29 @@
package main
import (
"github.com/Sirupsen/logrus"
)
var log = logrus.New()
func init() {
log.Formatter = new(logrus.JSONFormatter)
log.Formatter = new(logrus.TextFormatter) // default
}
func main() {
log.WithFields(logrus.Fields{
"animal": "walrus",
"size": 10,
}).Info("A group of walrus emerges from the ocean")
log.WithFields(logrus.Fields{
"omg": true,
"number": 122,
}).Warn("The group's number increased tremendously!")
log.WithFields(logrus.Fields{
"omg": true,
"number": 100,
}).Fatal("The ice breaks!")
}