Option to set log format from python

This commit is contained in:
Thomas Krijnen
2022-02-26 14:53:09 +01:00
parent 8be79f9aee
commit d16f92a445
+8
View File
@@ -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);
}
%}
%{