Skip to content

Commit

Permalink
Use strconv.FormatInt for converting int64 to string
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jun 25, 2024
1 parent 4b6229b commit 16c345e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (ac *Config) CommonLogFormat(req *http.Request, statusCode int, byteSize in
}
byteSizeString := "0"
if byteSize > 0 {
byteSizeString = fmt.Sprintf("%d", byteSize)
byteSizeString = strconv.FormatInt(byteSize, 10)
}
timestamp := strings.Replace(time.Now().Format("02/Jan/2006 15:04:05 -0700"), " ", ":", 1)
return fmt.Sprintf("%s - %s [%s] \"%s %s %s\" %s %s", ip, username, timestamp, req.Method, req.RequestURI, req.Proto, statusCodeString, byteSizeString)
Expand Down

0 comments on commit 16c345e

Please sign in to comment.