Skip to content

Commit

Permalink
style: add better log message for route population
Browse files Browse the repository at this point in the history
  • Loading branch information
sansyrox committed Nov 5, 2023
1 parent 5497936 commit 2cf2a1e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions robyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ def add_route(
}
route_type = http_methods[route_type]

logger.info("Logging endpoint: method=%s, route=%s", route_type, endpoint)

return self.router.add_route(
add_route_response = self.router.add_route(
route_type,
endpoint,
handler,
Expand All @@ -111,6 +109,10 @@ def add_route(
self.response_headers,
)

logger.info("Added route %s %s", route_type, endpoint)

return add_route_response

def before_request(self, endpoint: Optional[str] = None) -> Callable[..., None]:
"""
You can use the @app.before_request decorator to call a method before routing to the specified endpoint
Expand Down

0 comments on commit 2cf2a1e

Please sign in to comment.