Skip to content
New issue

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

access log middleware: latency value is too long #1231

Closed
teresadq opened this issue Nov 15, 2024 · 1 comment
Closed

access log middleware: latency value is too long #1231

teresadq opened this issue Nov 15, 2024 · 1 comment

Comments

@teresadq
Copy link

teresadq commented Nov 15, 2024

Describe the bug

When using access log middleware and setup ${latency}, the output value contains too many white space!!!

To Reproduce
use the code below:

	h.Use(
		accesslog.New(
			accesslog.WithFormat(`[${time}] status=${status} latency="${latency}" method=${method} path=${path} queryParams=${queryParams}`),
		),
	)

Expected behavior

we expect the output is latency="459ns". But we got latency=" 459ns".

Screenshots

image

Hertz version:

hertz: v0.9.3

Environment:

go version go1.23.1 linux/amd64

@xiaost
Copy link
Contributor

xiaost commented Nov 27, 2024

@teresadq accesslog is NOT a part of this hertz repo.
kindly report on corresponding issue page of accesslog.

@xiaost xiaost closed this as completed Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants