logger.go 355 B

1234567891011121314151617181920
  1. package nsqd
  2. import (
  3. "github.com/nsqio/nsq/internal/lg"
  4. )
  5. type Logger lg.Logger
  6. const (
  7. LOG_DEBUG = lg.DEBUG
  8. LOG_INFO = lg.INFO
  9. LOG_WARN = lg.WARN
  10. LOG_ERROR = lg.ERROR
  11. LOG_FATAL = lg.FATAL
  12. )
  13. func (n *NSQD) logf(level lg.LogLevel, f string, args ...interface{}) {
  14. opts := n.getOpts()
  15. lg.Logf(opts.Logger, opts.LogLevel, level, f, args...)
  16. }