interface.go 741 B

12345678910111213141516171819202122232425262728293031
  1. package log
  2. import "github.com/inconshreveable/log15"
  3. type Lvl int
  4. const (
  5. LvlCrit Lvl = iota
  6. LvlError
  7. LvlWarn
  8. LvlInfo
  9. LvlDebug
  10. )
  11. type Logger interface {
  12. // New returns a new Logger that has this logger's context plus the given context
  13. New(ctx ...interface{}) log15.Logger
  14. // GetHandler gets the handler associated with the logger.
  15. GetHandler() log15.Handler
  16. // SetHandler updates the logger to write records to the specified handler.
  17. SetHandler(h log15.Handler)
  18. // Log a message at the given level with context key/value pairs
  19. Debug(msg string, ctx ...interface{})
  20. Info(msg string, ctx ...interface{})
  21. Warn(msg string, ctx ...interface{})
  22. Error(msg string, ctx ...interface{})
  23. Crit(msg string, ctx ...interface{})
  24. }