mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
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:
parent
341d012cea
commit
25f3ca2be2
1 changed files with 3 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue