req.logger/res.logger `silent` option in Express?
See original GitHub issueI have a healthcheck route for my loadbalancers to ping our core service.
I’d like to pass something like res.logger({ axe: {silent: true }})
to the route, in order to silence that specific message.
Is there any such ignore pattern for Express + CabinJS to achieve this on a specific route, rather than injecting a logger into every route? That is to say, is there an easy opt-out on a per-route basis, with a globally configured logger
Thank you! 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
pinojs/pino-http: high-speed HTTP logger for Node.js - GitHub
This function will be invoked to determine the level at which the log should be issued ( silent will prevent logging). This option...
Read more >How to disable HTTP request logs in Node/Express.js
How to disable HTTP request logs in Node/Express.js · 6. Move the logging pluggin below the resource pluggin in the app initialization. Done....
Read more >How to Implement Logging in a Node.js Application With Pino ...
The first option passed in the function is the logger itself that depicts the loggerService that you created earlier. The second option is ......
Read more >A Complete Guide to Pino Logging in Node.js - Better Stack
Learn how to start logging with Pino in Node.js and go from basics to best practices in no time.
Read more >A Guide to Node.js Logging - Twilio
const express = require('express'); const PORT = process.env.PORT || 3000; const app = express() ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think the approach where if the message is undefined or null it would be useful. Let’s do that. Implementing it now, one moment.
Thanks for the rapid turnaround @titanism much appreciated!