mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging user id in idstats
This commit is contained in:
@@ -724,7 +724,8 @@ function GetApp() {
|
||||
req.body.datatoadd || req.body,
|
||||
data,
|
||||
{ motd, version },
|
||||
dryRun
|
||||
dryRun,
|
||||
user
|
||||
)
|
||||
.then((result) => {
|
||||
res.json({
|
||||
|
@@ -171,9 +171,6 @@ Object.keys(modules).forEach(function(k, i) {
|
||||
}
|
||||
})
|
||||
|
||||
const locLogFile = './stats/logs'
|
||||
const allLogFile = '/nlogs/log'
|
||||
|
||||
// https://certbot.eff.org/
|
||||
const privkeyFile = '/etc/letsencrypt/live/frylabs.net/privkey.pem'
|
||||
const fullchainFile = '/etc/letsencrypt/live/frylabs.net/fullchain.pem'
|
||||
@@ -255,8 +252,6 @@ function LogTimerAction() {
|
||||
'==================================================================================================================================================='
|
||||
logger.Log(line)
|
||||
logger.setNewLogfileName()
|
||||
utils.AppendToFile(line, locLogFile)
|
||||
utils.AppendToFile(line, allLogFile)
|
||||
}
|
||||
|
||||
logger.Log('Node version: ' + process.version)
|
||||
|
@@ -37,7 +37,7 @@ const { addQuestion, getSubjNameWithoutYear } = require('./classes.js')
|
||||
const writeAfter = 1 // write after # of adds FIXME: set reasonable save rate
|
||||
var currWrites = 0
|
||||
|
||||
function ProcessIncomingRequest(recievedData, qdb, infos, dryRun) {
|
||||
function ProcessIncomingRequest(recievedData, qdb, infos, dryRun, user) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logger.DebugLog('Processing incoming request', 'actions', 1)
|
||||
if (recievedData === undefined) {
|
||||
@@ -153,7 +153,7 @@ function ProcessIncomingRequest(recievedData, qdb, infos, dryRun) {
|
||||
let subjRow = '\t' + data.subj
|
||||
if (data.id) {
|
||||
subjRow += ' ( CID: ' + logger.logHashed(data.id) + ')'
|
||||
idStats.LogId(data.id, data.subj)
|
||||
idStats.LogId(user.id, data.subj)
|
||||
}
|
||||
logger.Log(subjRow)
|
||||
if (data.version !== undefined) {
|
||||
|
Reference in New Issue
Block a user