We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fileConfig := &go_logger.FileConfig{ LevelFileName: map[int]string{ Logger.LoggerLevel("error"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("info"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("debug"): fmt.Sprintf("%s/file.log", logDir), }, MaxSize: 0, MaxLine: 1000000, DateSlice: "y", JsonFormat: false, Format: logFormat, } 设置如上, 发现一个奇怪的问题4月9号的日志输出到了切割出的4月2号的文件中。
fileConfig := &go_logger.FileConfig{ LevelFileName: map[int]string{ Logger.LoggerLevel("error"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("info"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("debug"): fmt.Sprintf("%s/file.log", logDir), }, MaxSize: 0, MaxLine: 1000000, DateSlice: "y", JsonFormat: false, Format: logFormat, }
The text was updated successfully, but these errors were encountered:
我也遇到这个问题了
Sorry, something went wrong.
看了代码,发现是理解错了。 日志一直往初始化指定的文件写,当指定的时间间隔到了时,会把该文件中的所有内容切换到新的文件中,然后清空初始化指定的文件,继续往里头写。
No branches or pull requests
fileConfig := &go_logger.FileConfig{ LevelFileName: map[int]string{ Logger.LoggerLevel("error"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("info"): fmt.Sprintf("%s/file.log", logDir), Logger.LoggerLevel("debug"): fmt.Sprintf("%s/file.log", logDir), }, MaxSize: 0, MaxLine: 1000000, DateSlice: "y", JsonFormat: false, Format: logFormat, }
设置如上, 发现一个奇怪的问题4月9号的日志输出到了切割出的4月2号的文件中。
The text was updated successfully, but these errors were encountered: