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

Logger middleware does not work as expectation #214

Closed
ansidev opened this issue Nov 12, 2021 · 1 comment
Closed

Logger middleware does not work as expectation #214

ansidev opened this issue Nov 12, 2021 · 1 comment

Comments

@ansidev
Copy link
Contributor

ansidev commented Nov 12, 2021

Config

app.Use(logger.New(logger.Config{
	Format:     "[${pid}]:${port} ${status} - ${method} ${path}\n",
	TimeFormat: "2006-01-02T15:04:05.0Z",
	TimeZone:   "Asia/Ho_Chi_Minh",
}))

Output

2021-11-12T09:29:26.4Z | 200 |      0s |       127.0.0.1 | GET     | /hello

Config

app.Use(logger.New(logger.Config{
        Format:     "[${ip}]:${port} ${status} - ${method} ${path}\n",
}))

Output

09:44:28 | 200 |      0s |       127.0.0.1 | GET     | /hello

I think this is a bug! Did I miss something?

@ReneWerner87
Copy link
Member

Duplicate of #1609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants