diff options
author | Lukas Macko <lmacko@cisco.com> | 2017-09-12 09:54:58 +0200 |
---|---|---|
committer | Lukas Macko <lmacko@cisco.com> | 2017-09-12 10:49:11 +0200 |
commit | 217383b613248c79b542623ec6c571591de113ce (patch) | |
tree | 35b2064a8b780e0b18a8ffba31757caa2ed3e10f /vendor/github.com/sirupsen/logrus/examples/hook/hook.go | |
parent | d07761baec9f09aef0b140ea46e38bd597dbdbbc (diff) |
Use Sirupsen/logrus with uppercase
Change-Id: I2f8870c52f64eb56deb44e4a807867b3ef0a0b76
Signed-off-by: Lukas Macko <lmacko@cisco.com>
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/examples/hook/hook.go')
-rw-r--r-- | vendor/github.com/sirupsen/logrus/examples/hook/hook.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/github.com/sirupsen/logrus/examples/hook/hook.go b/vendor/github.com/sirupsen/logrus/examples/hook/hook.go deleted file mode 100644 index c8470c3..0000000 --- a/vendor/github.com/sirupsen/logrus/examples/hook/hook.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "github.com/sirupsen/logrus" - "gopkg.in/gemnasium/logrus-airbrake-hook.v2" -) - -var log = logrus.New() - -func init() { - log.Formatter = new(logrus.TextFormatter) // default - log.Hooks.Add(airbrake.NewHook(123, "xyz", "development")) -} - -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!") -} |