mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Req logger undefined session fix
This commit is contained in:
parent
558e985773
commit
86e84cd9f7
1 changed files with 1 additions and 1 deletions
|
@ -32,7 +32,7 @@ module.exports = function (options) {
|
|||
|
||||
logger.LogReq(req, true, res.statusCode)
|
||||
if (toLog) { logger.LogReq(req) }
|
||||
if (res.statusCode !== 404) { logger.LogStat(req.url, ip, hostname, req.session.user) }
|
||||
if (res.statusCode !== 404) { logger.LogStat(req.url, ip, hostname, req.session ? req.session.user : 'NOUSER') }
|
||||
})
|
||||
next()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue