ilogger.go 579 B

12345678910111213141516171819202122232425262728293031
  1. package core
  2. type LogLevel int
  3. const (
  4. // !nashtsai! following level also match syslog.Priority value
  5. LOG_DEBUG LogLevel = iota
  6. LOG_INFO
  7. LOG_WARNING
  8. LOG_ERR
  9. LOG_OFF
  10. LOG_UNKNOWN
  11. )
  12. // logger interface
  13. type ILogger interface {
  14. Debug(v ...interface{})
  15. Debugf(format string, v ...interface{})
  16. Error(v ...interface{})
  17. Errorf(format string, v ...interface{})
  18. Info(v ...interface{})
  19. Infof(format string, v ...interface{})
  20. Warn(v ...interface{})
  21. Warnf(format string, v ...interface{})
  22. Level() LogLevel
  23. SetLevel(l LogLevel)
  24. ShowSQL(show ...bool)
  25. IsShowSQL() bool
  26. }