Skip to content

Commit 04dffeb

Browse files
docs(hertz):fix typo in log example
1 parent 268f066 commit 04dffeb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • content
    • en/docs/hertz/tutorials/observability
    • zh/docs/hertz/tutorials/observability

content/en/docs/hertz/tutorials/observability/log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func AccessLog() app.HandlerFunc {
1818
start := time.Now()
1919
c.Next(ctx)
2020
end := time.Now()
21-
latency := end.Sub(start).Microseconds
21+
latency := end.Sub(start).Microseconds()
2222
hlog.CtxTracef(ctx, "status=%d cost=%d method=%s full_path=%s client_ip=%s host=%s",
2323
c.Response.StatusCode(), latency,
2424
c.Request.Header.Method(), c.Request.URI().PathOriginal(), c.ClientIP(), c.Request.Host())

content/zh/docs/hertz/tutorials/observability/log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func AccessLog() app.HandlerFunc {
1818
start := time.Now()
1919
c.Next(ctx)
2020
end := time.Now()
21-
latency := end.Sub(start).Microseconds
21+
latency := end.Sub(start).Microseconds()
2222
hlog.CtxTracef(ctx, "status=%d cost=%d method=%s full_path=%s client_ip=%s host=%s",
2323
c.Response.StatusCode(), latency,
2424
c.Request.Header.Method(), c.Request.URI().PathOriginal(), c.ClientIP(), c.Request.Host())

0 commit comments

Comments
 (0)