mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
passing user.id as userid, not only user
This commit is contained in:
parent
86e84cd9f7
commit
919e3db04c
2 changed files with 9 additions and 1 deletions
|
@ -32,7 +32,13 @@ 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 ? req.session.user : 'NOUSER') }
|
||||
if (res.statusCode !== 404) {
|
||||
logger.LogStat(req.url,
|
||||
ip,
|
||||
hostname,
|
||||
req.session && req.session.user ? req.session.user.id : 'NOUSER'
|
||||
)
|
||||
}
|
||||
})
|
||||
next()
|
||||
}
|
||||
|
|
|
@ -210,6 +210,8 @@ function Load () {
|
|||
}
|
||||
|
||||
function LogStat (url, ip, hostname, userId) {
|
||||
console.log(arguments)
|
||||
|
||||
let nolog = noLogips.some((x) => {
|
||||
return x.includes(ip)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue