mirror of
https://github.com/woodchen-ink/random-api-go.git
synced 2025-07-19 14:22:00 +08:00
style(api_handler): adjust log format for better readability
This commit is contained in:
parent
402c6cf82d
commit
973fe5c8de
@ -80,7 +80,7 @@ func HandleAPIRequest(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
duration := time.Since(start)
|
duration := time.Since(start)
|
||||||
|
|
||||||
log.Printf(" %12s | %15s | %-6s | %-50s | %s | %-50s",
|
log.Printf(" %-12s | %-15s | %-6s | %-20s | %-20s | %-50s",
|
||||||
duration, // 持续时间
|
duration, // 持续时间
|
||||||
realIP, // 真实IP
|
realIP, // 真实IP
|
||||||
r.Method, // HTTP方法
|
r.Method, // HTTP方法
|
||||||
|
Loading…
x
Reference in New Issue
Block a user