From 8cf8711e35a8f87c9c45a5f0827979972f12d816 Mon Sep 17 00:00:00 2001 From: Romain Bazile Date: Sat, 5 Dec 2020 03:10:25 +0100 Subject: [PATCH] flow: set log to flow context --- flows/main.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flows/main.json b/flows/main.json index 75449a9..293a187 100644 --- a/flows/main.json +++ b/flows/main.json @@ -6418,7 +6418,7 @@ "type": "function", "z": "9daf9e2b.019fc", "name": "Log array", - "func": "var log = context.get(\"python_log\")||[];\n\nlog = log.concat(msg.payload.trim().split('\\n'));\n\nwhile (log.length > 500){\n log.shift();\n}\n\ncontext.set(\"python_log\", log);\n\nmsg.payload = log;\nreturn msg;", + "func": "var log = flow.get(\"python_log\")||[];\n\nlog = log.concat(msg.payload.trim().split('\\n'));\n\nwhile (log.length > 500){\n log.shift();\n}\n\nflow.set(\"python_log\", log);\n\nmsg.payload = log;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", @@ -6495,7 +6495,7 @@ "type": "function", "z": "9daf9e2b.019fc", "name": "Clear log", - "func": "context.set(\"python_log\", []);\n\nmsg.payload = [];\nreturn msg;", + "func": "flow.set(\"python_log\", []);\n\nmsg.payload = [];\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "",