Skip to content

Commit

Permalink
修复zap 日志写入error invalid argument
Browse files Browse the repository at this point in the history
  • Loading branch information
fireinrain committed Mar 20, 2023
1 parent 9a4cd3f commit c2535bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions log/zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func init() {
filePath = filepath.ToSlash(filePath)
if runtime.GOOS == "windows" {
filePath = strings.ReplaceAll(filePath, "/", "\\")
filePath = strings.ReplaceAll(filePath, ":", "-")
}
//提前创建日志文件
logFile, err := os.Create(filePath)
Expand Down

0 comments on commit c2535bf

Please sign in to comment.