From 090bb34f7c247309330120bbece79c861aa81c9a Mon Sep 17 00:00:00 2001 From: "jiang.pengcheng" Date: Fri, 18 Aug 2023 16:25:41 +0800 Subject: [PATCH] Fix python json log format --- controllers/spec/template/python-runtime-log-config.ini.tmpl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controllers/spec/template/python-runtime-log-config.ini.tmpl b/controllers/spec/template/python-runtime-log-config.ini.tmpl index 285362daf..340a79c12 100644 --- a/controllers/spec/template/python-runtime-log-config.ini.tmpl +++ b/controllers/spec/template/python-runtime-log-config.ini.tmpl @@ -22,7 +22,11 @@ handlers={{ .Handlers }} [handler_stream_handler] class=StreamHandler level={{ .Level }} +{{ if .Format | eq "json" }} +formatter=json +{{ else }} formatter=formatter +{{ end }} args=(sys.stdout,) {{ if .Format | eq "json" }}