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
disableRequestLogging
should disable logs in default error handler
#5409
Comments
Setting a custom Though, I do see the benefit when you might not want to customize the |
Could I then create a PR related to this? |
Please, PR always welcomed |
Great, I'm working on it Would you like also to apply the same behaviour to the 404 handler? |
Sure, I believe the configuration should apply widely 👍 |
Fixed through #5435 |
Prerequisites
Fastify version
4.26.2
Plugin version
No response
Node.js version
v20.11.1
Operating system
macOS
Operating system version (i.e. 20.04, 11.3, 10)
14.4.1
Description
I am trying to have a full control over the log entries Fastify writes and I noticed that in the default error handler it writes records without checking the
disableRequestLogging
value.Should it check if and disable logging when it is
true
or is it preferred to set a custom error handler to prevent it?Steps to Reproduce
Expected Behavior
No log entries added when an error is managed by the default error handler
The text was updated successfully, but these errors were encountered: