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

Logging Middleware - TagLatency doesn't have standard format between modes #1943

Merged
merged 1 commit into from Jul 4, 2022

Conversation

marcelogamba
Copy link
Contributor

@marcelogamba marcelogamba commented Jun 27, 2022

Please provide enough information so that others can review your pull request:

This change affects TagLatency in middleware logging.
Currently if you don't change the default format the latency output is using millisecond as rounding, however if you configure a custom logging message format it outputs using time.Duration (string) serialization.

I can enumerate two problems:

  • Standard between the two options (Default and Custom Format)
  • time.Duration will output characters in UTF8 and UNICODE (UTF-16) according to its serialization unit (microseconds)

This PR suggests replacing time.Duration serialization to millisecond, the same used in DefaultFormat.

@welcome
Copy link

welcome bot commented Jun 27, 2022

Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

@marcelogamba
Copy link
Contributor Author

marcelogamba commented Jun 28, 2022

Hi there, apparently there is a problem with other modules compiling/testing on MacOs.
Unfortunately I don't have a Mac to try a fix. As far as I noticed my change doesn't affected those tests failing (memory test).

Could anyone help?

@efectn
Copy link
Member

efectn commented Jun 28, 2022

Hi there, apparently there is a problem with other modules compiling/testing on MacOs. Unfortunately I don't have a Mac to try a fix. As far as I noticed my change doesn't affected those tests failing (memory test).

Could anyone help?

I don't think the problem is related this PR. Tests related timeout is falling randomly. I'll check them.

@ReneWerner87 ReneWerner87 merged commit e58ad6b into gofiber:master Jul 4, 2022
21 checks passed
@welcome
Copy link

welcome bot commented Jul 4, 2022

Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord

trim21 pushed a commit to trim21/fiber that referenced this issue Aug 15, 2022
… format (gofiber#1943)

Co-authored-by: Marcelo Gamba <gamba@itstransdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants