Console access log output is now controlled by enableAccessLog
Signed| @@ -37,11 +37,11 @@ export default function accessLoggerMiddleware() { | ||
| 37 | 37 | |
| 38 | 38 | if (!knownIPs.has(clientIp)) { |
| 39 | 39 | // Log new connection |
| 40 | - console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`)); | |
| 41 | 40 | knownIPs.add(clientIp); |
| 42 | 41 | |
| 43 | 42 | // Write to access log if enabled |
| 44 | 43 | if (enableAccessLog) { |
| 44 | + console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`)); | |
| 45 | 45 | const logPath = getAccessLogPath(); |
| 46 | 46 | const timestamp = new Date().toISOString(); |
| 47 | 47 | const log = `${timestamp} ${clientIp} ${userAgent}\n`; |