-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🚀 [Feature]: middleware/logger: use Logger interface #2737
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
Hi. Can you provide a proof-of-concept? If we can do it without breaking something on v2, it's OK to me. Otherwise, we have to adjust logger middleware on v3. |
I don't have a concrete idea how to do this cleanly right now.
That sounds reasonable to me. It's nothing urgent (at least for me) and also takes less effort (no need to keep the compatibility with the current template interface). |
Hi, I would like to contribute this task as my first contribution to gofiber. From what I read about the This could include some modifications on the |
Hi @haochunchang feel free to create a PR |
Feature Description
With the introduction of
Logger
interface (#2499), it is easier now to plug my own log library into Fiber. With that said,logger
middleware still usesfmt.Sprintf()
.It would be nice if
logger
middleware is extended to accept logging viaLogger
interface. This creates an easier method to have structure log for requests/responses without the need of making a custom external middleware. Judging from #1293 (comment), if we want to keep the currentlogger
middleware as simple as it is, making a new logger middleware would also be reasonable.Additional Context (optional)
No response
Code Snippet (optional)
No response
Checklist:
The text was updated successfully, but these errors were encountered: