mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
comment updates
This commit is contained in:
@ -83,7 +83,7 @@ func SetDebug(debug bool) {
|
||||
logger.SetDebug(debug)
|
||||
}
|
||||
|
||||
// SetStdPrint sets whether ouptput the logging contents to stdout, which is false in default.
|
||||
// SetStdoutPrint sets whether ouptput the logging contents to stdout, which is false in default.
|
||||
func SetStdoutPrint(enabled bool) {
|
||||
logger.SetStdoutPrint(enabled)
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ func (l *Logger) SetFile(pattern string) {
|
||||
l.file = pattern
|
||||
}
|
||||
|
||||
// SetStdPrint sets whether output the logging contents to stdout, which is true in default.
|
||||
// SetStdoutPrint sets whether output the logging contents to stdout, which is true in default.
|
||||
func (l *Logger) SetStdoutPrint(enabled bool) {
|
||||
l.stdoutPrint = enabled
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ func main() {
|
||||
l := glog.New()
|
||||
path := "/tmp/glog"
|
||||
l.SetPath(path)
|
||||
l.SetStdPrint(false)
|
||||
l.SetStdoutPrint(false)
|
||||
// 使用默认文件名称格式
|
||||
l.Println("标准文件名称格式,使用当前时间时期")
|
||||
// 通过SetFile设置文件名称格式
|
||||
|
||||
Reference in New Issue
Block a user