Skip to content
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

[Help] How to log unsuccessfull request/response only? #868

Open
dangnhdev opened this issue Apr 15, 2023 · 1 comment
Open

[Help] How to log unsuccessfull request/response only? #868

dangnhdev opened this issue Apr 15, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@dangnhdev
Copy link

For example I want to log only requests with 4xx and 5xx response status code.

Environment

  • node version: 18
  • fastify version: 4.15.0
@dangnhdev dangnhdev added the help wanted Extra attention is needed label Apr 15, 2023
@metcoder95
Copy link
Member

Hi!
You can disable the request logging by setting disablingRequestLogging when creating your fastify app.

See the following docs: https://www.fastify.io/docs/latest/Reference/Server/#disablerequestlogging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants