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

Add start time to request logger middleware values #1991

Merged
merged 1 commit into from Sep 23, 2021

Conversation

aldas
Copy link
Contributor

@aldas aldas commented Sep 21, 2021

Add start time to request logger middleware values to get time value just before next middleware/handler was called. Logger middlewares timestamps are for instants after handler next(c) has returned back to request logger scope. v.StartTime gives you time before.

See #1989 (comment)

@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #1991 (845ad5d) into master (4651c7a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1991   +/-   ##
=======================================
  Coverage   91.23%   91.23%           
=======================================
  Files          33       33           
  Lines        2886     2887    +1     
=======================================
+ Hits         2633     2634    +1     
  Misses        161      161           
  Partials       92       92           
Impacted Files Coverage Δ
middleware/request_logger.go 97.59% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4651c7a...845ad5d. Read the comment docs.

@aldas aldas requested a review from pafuent September 21, 2021 13:13
@aldas
Copy link
Contributor Author

aldas commented Sep 21, 2021

@pafuent please review

Copy link
Contributor

@pafuent pafuent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aldas aldas merged commit a2e6ca7 into labstack:master Sep 23, 2021
@aldas aldas deleted the request_logger_add_start_time branch January 8, 2022 15:44
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

Successfully merging this pull request may close these issues.

None yet

2 participants