修正日志文件中打印源码文件名和行数错误

This commit is contained in:
boyce
2019-02-23 11:22:27 +08:00
parent 034ac53db3
commit af9d089472

View File

@@ -79,7 +79,7 @@ func (slf *LogModule) Printf(level uint, format string, v ...interface{}) {
} }
slf.CheckAndGenFile() slf.CheckAndGenFile()
slf.GetLoggerByLevel(level).Printf(format, v...) slf.GetLoggerByLevel(level).Output(3, fmt.Sprintf(format, v...))
} }
func (slf *LogModule) Print(level uint, v ...interface{}) { func (slf *LogModule) Print(level uint, v ...interface{}) {
@@ -88,5 +88,5 @@ func (slf *LogModule) Print(level uint, v ...interface{}) {
} }
slf.CheckAndGenFile() slf.CheckAndGenFile()
slf.GetLoggerByLevel(level).Print(v...) slf.GetLoggerByLevel(level).Output(3, fmt.Sprint(v...))
} }