get_log in python

This commit is contained in:
Thomas Krijnen
2017-08-19 16:54:06 +02:00
parent 490c35bf60
commit 7bea054c1e
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -445,4 +445,18 @@ private:
IfcSchema::Type::PopulateDerivedFields(data);
return IfcSchema::SchemaEntity(data);
}
%}
%{
static std::stringstream ifcopenshell_log_stream;
%}
%init %{
Logger::SetOutput(0, &ifcopenshell_log_stream);
%}
%inline %{
std::string get_log() {
std::string log = ifcopenshell_log_stream.str();
ifcopenshell_log_stream.str("");
return log;
}
%}