From d16f92a445a241a870d6df6553151629abcfc465 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 26 Feb 2022 14:53:09 +0100 Subject: [PATCH] Option to set log format from python --- src/ifcwrap/IfcParseWrapper.i | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ifcwrap/IfcParseWrapper.i b/src/ifcwrap/IfcParseWrapper.i index c8f94f44db..d0ba2301fe 100644 --- a/src/ifcwrap/IfcParseWrapper.i +++ b/src/ifcwrap/IfcParseWrapper.i @@ -718,6 +718,14 @@ static IfcUtil::ArgumentType helper_fn_attribute_type(const IfcUtil::IfcBaseClas Logger::SetOutput(0, &ifcopenshell_log_stream); Logger::Verbosity(Logger::LOG_WARNING); } + void set_log_format_json() { + ifcopenshell_log_stream.str(""); + Logger::OutputFormat(Logger::FMT_JSON); + } + void set_log_format_text() { + ifcopenshell_log_stream.str(""); + Logger::OutputFormat(Logger::FMT_PLAIN); + } %} %{