goProject/.svn/pristine/48/4852aa2721098eea260b5d302d760e536bb7e64a.svn-base
2025-01-06 16:21:36 +08:00

36 lines
792 B
Plaintext

package impl_localfile
import "sync"
func (l *Logger) InfoLog(format string, args ...interface{}) {
l.log(getLog(format, args...), info, true)
}
func (l *Logger) WarnLog(format string, args ...interface{}) {
l.log(getLog(format, args...), warn, true)
}
func (l *Logger) DebugLog(format string, args ...interface{}) {
l.log(getLog(format, args...), debug, true)
}
func (l *Logger) ErrorLog(format string, args ...interface{}) {
l.log(getLog(format, args...), _error, true)
}
func (l *Logger) FatalLog(format string, args ...interface{}) {
l.log(getLog(format, args...), fatal, true)
}
func (l *Logger) CloseLog(waitFinish bool) {
wg := sync.WaitGroup{}
// 关闭所有的file
for _, logger := range l.loggerMap {
wg.Add(1)
go logger.Close(&wg, waitFinish)
}
wg.Wait()
}