🛠 Moved 404 requests from error log to access log (#8850)

no issue

- 404 errors clutter up the log files and stdout when developing
- We don't really need these as more than a single line, like other requests
- This is how it worked in LTS
- This is also more consistent with other software (e.g. nginx)
This commit is contained in:
Hannah Wolfe 2017-08-08 11:48:10 +01:00 committed by Katharina Irrgang
parent 2e8a8ad88a
commit d9b97c2a92

View File

@ -14,7 +14,7 @@ module.exports = function logRequest(req, res, next) {
req.requestId = requestId;
req.userId = req.user ? (req.user.id ? req.user.id : req.user) : null;
if (req.err) {
if (req.err && req.err.statusCode !== 404) {
logging.error({req: req, res: res, err: req.err});
} else {
logging.info({req: req, res: res});