g_logger.go 643 B

1234567891011121314151617181920212223
  1. // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package g
  7. import (
  8. "github.com/gogf/gf/os/glog"
  9. )
  10. // SetLogLevel sets the logging level globally.
  11. // Deprecated, use functions of package glog or g.Log() instead.
  12. func SetLogLevel(level int) {
  13. glog.SetLevel(level)
  14. }
  15. // GetLogLevel returns the global logging level.
  16. // Deprecated, use functions of package glog or g.Log() instead.
  17. func GetLogLevel() int {
  18. return glog.GetLevel()
  19. }