Console access log output is now controlled by enableAccessLog

d1a82c85a5cbe4d33606ce0e9d84122d6cd6f416

cloudskytian <cloudskytian@users.noreply.github.com>

Signed
1 files changed, +1 -1Showing whitespace changes
src/middleware/accessLogWriter.js+1 -1
@@ -37,11 +37,11 @@ export default function accessLoggerMiddleware() {
3737
38 if (!knownIPs.has(clientIp)) {38 if (!knownIPs.has(clientIp)) {
39 // Log new connection39 // Log new connection
40 console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`));
41 knownIPs.add(clientIp);40 knownIPs.add(clientIp);
4241
43 // Write to access log if enabled42 // Write to access log if enabled
44 if (enableAccessLog) {43 if (enableAccessLog) {
44 console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`));
45 const logPath = getAccessLogPath();45 const logPath = getAccessLogPath();
46 const timestamp = new Date().toISOString();46 const timestamp = new Date().toISOString();
47 const log = `${timestamp} ${clientIp} ${userAgent}\n`;47 const log = `${timestamp} ${clientIp} ${userAgent}\n`;