Downgrade all request logs to INFO

Commit 9056143fe36f1347a1ff985ef8592a1de7d798dd added logic to log
requests with different error levels depending on the status code. The
intention was to make the 5xx and 4xx requests stand out in Stackdriver.
Unfortunately, this also creates a lot of noise in Sentry since we log
the errors separately from the requests.

This commit brings back the former behaviour of logging all requests at
the INFO level. We can revisit this if we integrate the strategy
implemented in filestore of logging once per request.
This commit is contained in:
Eric Mc Sween 2020-03-18 08:41:11 -04:00
parent 7aff2e6f90
commit 25448bfef4

View file

@ -49,10 +49,5 @@ module.exports.monitor = (logger) ->
"content-length": res._headers?["content-length"]
statusCode: res.statusCode
"response-time": responseTimeMs
if res.statusCode >= 500
logger.error(info, "%s %s", req.method, reqUrl)
else if res.statusCode >= 400 and res.statusCode < 500
logger.warn(info, "%s %s", req.method, reqUrl)
else
logger.info(info, "%s %s", req.method, reqUrl)
logger.info(info, "%s %s", req.method, reqUrl)
next()