Merge pull request #6295 from overleaf/bg-fix-error-in-request-logger

[filestore] add missing params property to request logger

GitOrigin-RevId: 528558db5a3350c319d561dc5bae6f8ce1f6aa7a
This commit is contained in:
Brian Gough 2022-01-10 14:51:38 +00:00 committed by Copybot
parent 341d012cea
commit 25f3ca2be2

View file

@ -45,25 +45,9 @@ class RequestLogger {
const level = res.statusCode >= 500 ? 'err' : 'log'
logger[level](
{
req: {
url: req.originalUrl || req.url,
route: routePath,
method: req.method,
referrer: req.headers.referer || req.headers.referrer,
'remote-addr':
req.ip ||
(req.socket && req.socket.remoteAddress) ||
(req.socket &&
req.socket.socket &&
req.socket.socket.remoteAddress),
'user-agent': req.headers['user-agent'],
'content-length': req.headers['content-length'],
},
res: {
'content-length': res._headers['content-length'],
statusCode: res.statusCode,
'response-time': responseTime,
},
req,
res,
responseTimeMs: responseTime,
info: req.requestLogger._logInfo,
},
req.requestLogger._logMessage