MCPcopy
hub / github.com/aceld/zinx / SetLogFile

Method SetLogFile

zlog/logger_core.go:380–385  ·  view source on GitHub ↗

SetLogFile sets the log file output (设置日志文件输出)

(fileDir string, fileName string)

Source from the content-addressed store, hash-verified

378// SetLogFile sets the log file output
379// (设置日志文件输出)
380func (log *ZinxLoggerCore) SetLogFile(fileDir string, fileName string) {
381 if log.fw != nil {
382 log.fw.Close()
383 }
384 log.fw = zutils.New(filepath.Join(fileDir, fileName))
385}
386
387// SetMaxAge 最大保留天数
388func (log *ZinxLoggerCore) SetMaxAge(ma int) {

Callers 1

SetLogFileFunction · 0.80

Calls 2

NewFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected