diff --git a/lib/logBuffer.js b/lib/logBuffer.js index 3faabd2..f10120c 100644 --- a/lib/logBuffer.js +++ b/lib/logBuffer.js @@ -10,6 +10,7 @@ class LogBuffer { this.wrapped = false this.lastLogTimestamp = 0 this.lastLogTimestampCount = 0 + this.passThroughLogging = false } add (logEntry) { @@ -25,6 +26,8 @@ class LogBuffer { logEntry.ts = logEntry.ts + ('' + this.lastLogTimestampCount).padStart(4, '0') if (logEntry.level === 'system') { console.log(logEntry.msg) + } else if (process.env.FORGE_LOG_PASSTHROUGH) { + console.log(JSON.stringify(logEntry)) } if (!logEntry.src) { logEntry.src = instanceId