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 ${port} logger variable #1448

Merged
merged 3 commits into from
Jul 22, 2021
Merged

Conversation

markkrj
Copy link
Contributor

@markkrj markkrj commented Jul 21, 2021

Fix #1447

  • Added function c.Port() which get port from c.fasthttp.RemoteAddr()
  • Added port variable to middleware/logger

@welcome
Copy link

welcome bot commented Jul 21, 2021

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

@ReneWerner87
Copy link
Member

Could you add a description in the readme and a unittest fpr for this?

@markkrj
Copy link
Contributor Author

markkrj commented Jul 22, 2021

@ReneWerner87 can you check if it's ok now?

@ReneWerner87
Copy link
Member

Please check Screenshot_20210722-151607.jpg

@markkrj
Copy link
Contributor Author

markkrj commented Jul 22, 2021

@ReneWerner87 Simplified the code and ran tests locally with act, might be working now

@ReneWerner87 ReneWerner87 merged commit 30ba994 into gofiber:master Jul 22, 2021
@welcome
Copy link

welcome bot commented Jul 22, 2021

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

@markkrj markkrj deleted the add-addr-port branch July 22, 2021 17:43
@ReneWerner87
Copy link
Member

@markkrj can you please update https://github.com/gofiber/docs/blob/master/api/middleware/logger.md with the new variable

@markkrj
Copy link
Contributor Author

markkrj commented Aug 4, 2021

@ReneWerner87 I sure can do that, but I think linking that to https://github.com/gofiber/fiber/blob/master/middleware/logger/README.md is a better solution as it is more up to date... There is more changes to logger that are not documented in gofiber/docs. IMHO you should keep docs only in one place to avoid such discrepancy.

@ReneWerner87
Copy link
Member

yes gladly if git docs can work with it and does not produce a linkout when you click on it in the navigation all is good
https://docs.gofiber.io/api/middleware/logger

@ReneWerner87
Copy link
Member

just tested it, in the gitbook would then show an external link, so we have to copy it
gofiber/docs@c980089
gofiber/docs@68a3082

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.

🚀 Add ${port} variable in middleware/logger
2 participants