From 511dbdf78074c2e13f14c6d29b18ed8247363389 Mon Sep 17 00:00:00 2001 From: Floke Date: Sat, 3 Jan 2026 10:04:13 +0000 Subject: [PATCH] fix(debug): Stream python logs to console --- gtm-architect/server.cjs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtm-architect/server.cjs b/gtm-architect/server.cjs index 44b0d406..2af6d5d7 100644 --- a/gtm-architect/server.cjs +++ b/gtm-architect/server.cjs @@ -45,12 +45,17 @@ app.post('/api/run', (req, res) => { let stdoutData = ''; let stderrData = ''; + // STREAMING LOGS: Output Python logs immediately to Docker console pythonProcess.stdout.on('data', (data) => { - stdoutData += data.toString(); + const str = data.toString(); + console.log(`[Python stdout] ${str.trim()}`); + stdoutData += str; }); pythonProcess.stderr.on('data', (data) => { - stderrData += data.toString(); + const str = data.toString(); + console.error(`[Python stderr] ${str.trim()}`); + stderrData += str; }); pythonProcess.on('close', (code) => {