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) {