mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Logging status codes
This commit is contained in:
@@ -109,7 +109,6 @@ app.get('/*', function (req, res) {
|
|||||||
// relPath = relPath.replace(/\//g, "/");
|
// relPath = relPath.replace(/\//g, "/");
|
||||||
|
|
||||||
logger.LogReq(req)
|
logger.LogReq(req)
|
||||||
logger.LogReq(req, true, res.statusCode)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (fs.lstatSync(curr).isDirectory()) {
|
if (fs.lstatSync(curr).isDirectory()) {
|
||||||
|
@@ -95,7 +95,7 @@ function LogReq (req, toFile, sc) {
|
|||||||
|
|
||||||
logEntry += GetRandomColor(req.url.split('?')[0]) + req.url
|
logEntry += GetRandomColor(req.url.split('?')[0]) + req.url
|
||||||
|
|
||||||
if (sc !== undefined && sc === 404) { logEntry += dl + sc }
|
if (sc !== undefined) { logEntry += dl + sc }
|
||||||
|
|
||||||
logEntry += C()
|
logEntry += C()
|
||||||
if (!toFile) {
|
if (!toFile) {
|
||||||
|
Reference in New Issue
Block a user