本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
813B

  1. // Copyright 2019 The Xorm Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package core
  5. // LogLevel defines a log level
  6. type LogLevel int
  7. // enumerate all LogLevels
  8. const (
  9. // !nashtsai! following level also match syslog.Priority value
  10. LOG_DEBUG LogLevel = iota
  11. LOG_INFO
  12. LOG_WARNING
  13. LOG_ERR
  14. LOG_OFF
  15. LOG_UNKNOWN
  16. )
  17. // ILogger is a logger interface
  18. type ILogger interface {
  19. Debug(v ...interface{})
  20. Debugf(format string, v ...interface{})
  21. Error(v ...interface{})
  22. Errorf(format string, v ...interface{})
  23. Info(v ...interface{})
  24. Infof(format string, v ...interface{})
  25. Warn(v ...interface{})
  26. Warnf(format string, v ...interface{})
  27. Level() LogLevel
  28. SetLevel(l LogLevel)
  29. ShowSQL(show ...bool)
  30. IsShowSQL() bool
  31. }
上海开阖软件有限公司 沪ICP备12045867号-1