minor loggin fixes

This commit is contained in:
mrfry 2023-03-28 19:47:27 +02:00
parent a4b5dcff37
commit 9320f49151
4 changed files with 4 additions and 5 deletions

View file

@ -184,7 +184,7 @@ if (certsLoaded) {
httpsServer = https.createServer(certs, app) httpsServer = https.createServer(certs, app)
logger.Log('Listening on port: ' + httpsport + ' (https)') logger.Log('Listening on port: ' + httpsport + ' (https)')
} else { } else {
logger.Log('Https not avaible') logger.Log('Https not avaible', 'yellowbg')
} }
if (!process.env.NS_DEVEL) { if (!process.env.NS_DEVEL) {

View file

@ -184,19 +184,18 @@ function parseNoLogFile(newData: string) {
noLogIds = noLogIds.filter((noLogId) => { noLogIds = noLogIds.filter((noLogId) => {
return noLogId !== '' return noLogId !== ''
}) })
Log('\tNo Log user ID-s changed: ' + noLogIds.join(', '))
} }
function setNoLogReadInterval() { function setNoLogReadInterval() {
utils.WatchFile(nologFile, (newData: string) => { utils.WatchFile(nologFile, (newData: string) => {
parseNoLogFile(newData) parseNoLogFile(newData)
Log('No Log user ID-s changed: ' + noLogIds.join(', '))
}) })
parseNoLogFile(utils.ReadFile(nologFile)) parseNoLogFile(utils.ReadFile(nologFile))
} }
function Load(): void { function Load(): void {
Log('Loading logger...')
try { try {
uvData = JSON.parse(utils.ReadFile(uStatsFile)) uvData = JSON.parse(utils.ReadFile(uStatsFile))
} catch (err) { } catch (err) {

@ -1 +1 @@
Subproject commit 1446a57c28072384b471fcad71e8c637c98ff207 Subproject commit b9abbbf03c111ea5b2534681d7b11de8f8a79baa

@ -1 +1 @@
Subproject commit 32522097c0c0f442e93e00b54ed5dad495f8b093 Subproject commit 7f5c1ae7a7a0dd4016bc57f2b26e606e1553c79d