Skip to content

Conversation

oozan
Copy link

@oozan oozan commented Nov 20, 2024

What type of PR is this? (check all applicable)

  • Feature

Description

This PR adds a UseWithLogging method for middleware, allowing developers to log middleware execution by providing a name. This helps debug and trace middleware flow.

Changes

  • Added UseWithLogging to Router and Route.
  • Logs middleware execution using the provided name.
  • Created a test, TestMiddlewareExecutionWithLogging, to validate the functionality.

Related Tickets & Documents

None.

Added/updated tests?

  • Yes

Run verifications and test

  • make verify is passing
  • make test is passing

@titpetric
Copy link
Contributor

You just created a middleware with a log.Print.

May I direct you to the gorilla/handlers repo.

@oozan oozan closed this Jul 9, 2025
@oozan oozan deleted the feature/middleware-logging branch July 9, 2025 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants