Merge pull request #4302 from cloudskytian/staging Console access log output is now controlled by enableAccessLog

29702a3f1b25ca47bc09780f4edbca66341d0e2a

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
2 files changed, +2 -2Showing whitespace changes
default/config.yaml+1 -1
@@ -100,7 +100,7 @@ disableCsrfProtection: false
100100securityOverride: false
101101# -- LOGGING CONFIGURATION --
102102logging:
103103 # Enable access logging to access.log file and console output
104104 # Records new connections with timestamp, IP address and user agent
105105 enableAccessLog: true
106106 # Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3)
src/middleware/accessLogWriter.js+1 -1
@@ -37,11 +37,11 @@ export default function accessLoggerMiddleware() {
3737
3838 if (!knownIPs.has(clientIp)) {
3939 // Log new connection
40- console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`));
4140 knownIPs.add(clientIp);
4241
4342 // Write to access log if enabled
4443 if (enableAccessLog) {
44+ console.info(color.yellow(`New connection from ${clientIp}; User Agent: ${userAgent}\n`));
4545 const logPath = getAccessLogPath();
4646 const timestamp = new Date().toISOString();
4747 const log = `${timestamp} ${clientIp} ${userAgent}\n`;