mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Minor logging improvement, open all on legacy page
This commit is contained in:
@@ -60,6 +60,10 @@ function LogReq (req, toFile, sc) {
|
||||
if (sc !== undefined && sc === 404) { logEntry += DELIM + sc }
|
||||
let color = GetColor('green')
|
||||
|
||||
if (req.url.includes('lred')) {
|
||||
color = GetColor('red')
|
||||
}
|
||||
|
||||
if (req.url.toLowerCase().includes('isadding')) { color = GetColor('yellow') }
|
||||
if (!toFile) {
|
||||
Log(logEntry, color)
|
||||
|
@@ -53,6 +53,7 @@ function Load () {
|
||||
}
|
||||
|
||||
function LogStat (url) {
|
||||
url = url.split('?')[0]
|
||||
Inc(url)
|
||||
AddVisitStat(url)
|
||||
Save()
|
||||
|
Reference in New Issue
Block a user