-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the issue has not already been raised
Issue
If the rewriteUrl function is used, then a debug log is generated:
Lines 798 to 800 in c4cb3a8
| const url = rewriteUrl(req) | |
| if (originalUrl !== url) { | |
| logger.debug({ originalUrl, url }, 'rewrite url') |
This issue is more of a personal preference, but this behaviour creates a lot of extra log entries (1 per every request), which in my mind are not interesting.
My proposal is that the logging be removed. If the developer is interested in knowing when the URL is changed, then they can write their own log in the rewriteUrl function that they provide. Perhaps then we need to bind the rewriteUrl function to the fastify instance, or provide it as a parameter to they can access the logger easily.
Small bonus is that in this way we can also eliminate the URL equality check.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels