mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 03:27:05 -04:00
feat(logging): Exclude /status route from logging
This patch should reduce the logging noise a lot, by removing the `/status` route from logging unless hedgedoc is running in debug mode or the route throws an error code. This is achieved by providing a "skip"-function to the morgan logging provider. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
This commit is contained in:
parent
6c17823da1
commit
add5d998c0
2 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,7 @@ const statusRouter = module.exports = Router()
|
|||
|
||||
// get status
|
||||
statusRouter.get('/status', function (req, res, next) {
|
||||
req.skipLogging = true
|
||||
realtime.getStatus(function (data) {
|
||||
res.set({
|
||||
'Cache-Control': 'private', // only cache by client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue