diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index ad41cdea86..4e2a32fa9e 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -14,8 +14,8 @@ }, { "ImportPath": "github.com/Sirupsen/logrus", - "Comment": "v0.6.0-5-gf92b795", - "Rev": "f92b7950b372b1db80bd3527e4d40e42555fe6c2" + "Comment": "v0.6.1", + "Rev": "1f2ba2c6317323dd667bd266c1e8ebffc4a4c62f" }, { "ImportPath": "github.com/digitalocean/godo", diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md b/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md index 01769c723f..cabd027ae9 100644 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md +++ b/Godeps/_workspace/src/github.com/Sirupsen/logrus/README.md @@ -206,11 +206,18 @@ import ( log "github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus/hooks/airbrake" "github.com/Sirupsen/logrus/hooks/syslog" + "log/syslog" ) func init() { log.AddHook(new(logrus_airbrake.AirbrakeHook)) - log.AddHook(logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")) + + hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") + if err != nil { + log.Error("Unable to connect to local syslog daemon") + } else { + log.AddHook(hook) + } } ``` diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go index 0e2d59f19a..d087124481 100644 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go +++ b/Godeps/_workspace/src/github.com/Sirupsen/logrus/exported.go @@ -30,6 +30,11 @@ func SetLevel(level Level) { std.Level = level } +// GetLevel returns the standard logger level. +func GetLevel() Level { + return std.Level +} + // AddHook adds a hook to the standard logger hooks. func AddHook(hook Hook) { std.mu.Lock() diff --git a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go index 2a18ce6130..b6fa374628 100644 --- a/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go +++ b/Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog.go @@ -29,18 +29,18 @@ func (hook *SyslogHook) Fire(entry *logrus.Entry) error { return err } - switch entry.Data["level"] { - case "panic": + switch entry.Level { + case logrus.PanicLevel: return hook.Writer.Crit(line) - case "fatal": + case logrus.FatalLevel: return hook.Writer.Crit(line) - case "error": + case logrus.ErrorLevel: return hook.Writer.Err(line) - case "warn": + case logrus.WarnLevel: return hook.Writer.Warning(line) - case "info": + case logrus.InfoLevel: return hook.Writer.Info(line) - case "debug": + case logrus.DebugLevel: return hook.Writer.Debug(line) default: return nil