mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging improvements
This commit is contained in:
parent
cd026a504c
commit
7abcdc0cca
2 changed files with 3 additions and 3 deletions
|
@ -40,7 +40,7 @@ import utils from './utils/utils'
|
|||
import dbtools from './utils/dbtools'
|
||||
import reqlogger from './middlewares/reqlogger.middleware'
|
||||
import idStats from './utils/ids'
|
||||
const extraModulesFile = './extraModules/extraModules.json'
|
||||
const extraModulesFile = '.src/extraModules/extraModules.json'
|
||||
const statExcludeFile = './data/statExclude.json'
|
||||
const modulesFile = './src/modules.json'
|
||||
const usersDBPath = './data/dbs/users.db'
|
||||
|
@ -160,7 +160,7 @@ const excludeFromStats = utils.ReadJSON(statExcludeFile)
|
|||
|
||||
app.use(
|
||||
reqlogger({
|
||||
loggableKeywords: ['news.json'],
|
||||
loggableKeywords: [],
|
||||
loggableModules: [],
|
||||
exceptions: ['_next/static'],
|
||||
excludeFromStats: excludeFromStats,
|
||||
|
|
|
@ -123,7 +123,7 @@ function LogReq(req: Request, toFile?: boolean, statusCode?: string): void {
|
|||
let ip: any =
|
||||
req.headers['cf-connecting-ip'] || req.connection.remoteAddress
|
||||
if (!toFile) {
|
||||
ip = expandWithSpaces(ip, 35)
|
||||
ip = expandWithSpaces(ip, 39)
|
||||
}
|
||||
const nolog = noLogips.some((noLogip) => {
|
||||
return ip.includes(noLogip)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue