feat(logging): a lot of progress on moving to new logging lib, #4590

This commit is contained in:
Torkel Ödegaard
2016-06-06 23:06:44 +02:00
parent 25899b72d2
commit 22778e6efd
18 changed files with 314 additions and 707 deletions
+31
View File
@@ -0,0 +1,31 @@
package log
import "github.com/inconshreveable/log15"
type Lvl int
const (
LvlCrit Lvl = iota
LvlError
LvlWarn
LvlInfo
LvlDebug
)
type Logger interface {
// New returns a new Logger that has this logger's context plus the given context
New(ctx ...interface{}) log15.Logger
// GetHandler gets the handler associated with the logger.
GetHandler() log15.Handler
// SetHandler updates the logger to write records to the specified handler.
SetHandler(h log15.Handler)
// Log a message at the given level with context key/value pairs
Debug(msg string, ctx ...interface{})
Info(msg string, ctx ...interface{})
Warn(msg string, ctx ...interface{})
Error(msg string, ctx ...interface{})
Crit(msg string, ctx ...interface{})
}