2019-02-02 16:18:25 +08:00
|
|
|
// Copyright 2018 gf Author(https://github.com/gogf/gf). All Rights Reserved.
|
2018-09-26 09:58:49 +08:00
|
|
|
//
|
|
|
|
// This Source Code Form is subject to the terms of the MIT License.
|
|
|
|
// If a copy of the MIT was not distributed with this file,
|
2019-02-02 16:18:25 +08:00
|
|
|
// You can obtain one at https://github.com/gogf/gf.
|
2018-09-26 09:58:49 +08:00
|
|
|
|
|
|
|
package g
|
|
|
|
|
2018-11-01 09:46:35 +08:00
|
|
|
import (
|
2019-02-02 16:18:25 +08:00
|
|
|
"github.com/gogf/gf/g/os/glog"
|
2018-11-01 09:46:35 +08:00
|
|
|
)
|
|
|
|
|
2019-02-27 22:17:09 +08:00
|
|
|
// Disable/Enabled debug of logging globally.
|
|
|
|
//
|
2018-10-30 23:58:10 +08:00
|
|
|
// 是否显示调试信息
|
|
|
|
func SetDebug(debug bool) {
|
|
|
|
glog.SetDebug(debug)
|
|
|
|
}
|
|
|
|
|
2019-02-27 22:17:09 +08:00
|
|
|
// Set the logging level globally.
|
|
|
|
//
|
2018-10-30 23:58:10 +08:00
|
|
|
// 设置日志的显示等级
|
|
|
|
func SetLogLevel(level int) {
|
|
|
|
glog.SetLevel(level)
|
|
|
|
}
|
|
|
|
|
2019-02-27 22:17:09 +08:00
|
|
|
// Get the global logging level.
|
|
|
|
//
|
2018-10-30 23:58:10 +08:00
|
|
|
// 获取设置的日志显示等级
|
|
|
|
func GetLogLevel() int {
|
|
|
|
return glog.GetLevel()
|
|
|
|
}
|