Skip to content

🚀 [Feature]: middleware/logger: use Logger interface #2737

Description

@folliehiyuki

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 uses fmt.Sprintf().

It would be nice if logger middleware is extended to accept logging via Logger 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 current logger 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:

  • I agree to follow Fiber's Code of Conduct.
  • I have checked for existing issues that describe my suggestion prior to opening this one.
  • I understand that improperly formatted feature requests may be closed without explanation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions