diff --git a/hosting/.env b/hosting/.env index c2b6d55eef..8a0756c0e3 100644 --- a/hosting/.env +++ b/hosting/.env @@ -28,3 +28,4 @@ BB_ADMIN_USER_PASSWORD= # A path that is watched for plugin bundles. Any bundles found are imported automatically/ PLUGINS_DIR= +ROLLING_LOG_MAX_SIZE= \ No newline at end of file diff --git a/packages/backend-core/src/logging/system.ts b/packages/backend-core/src/logging/system.ts index 7bca469e5c..98f2b155a5 100644 --- a/packages/backend-core/src/logging/system.ts +++ b/packages/backend-core/src/logging/system.ts @@ -11,7 +11,6 @@ const rollingFileName = `${logsFileName}.bak` export function localFileDestination() { const outFile = rfs.createStream(logsFileName, { size: env.ROLLING_LOG_MAX_SIZE, - teeToStdout: true, }) outFile.on("rotation", () => { @@ -28,6 +27,6 @@ export function getLogReadStream() { } const rollingContent = fs.readFileSync(rollingFileName) - const combinedContent = Buffer.concat([logsContent, rollingContent]) + const combinedContent = Buffer.concat([rollingContent, logsContent]) return combinedContent }