mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 16:06:27 +00:00
get_log in python
This commit is contained in:
@@ -70,3 +70,4 @@ def create_entity(type,*args,**kwargs):
|
|||||||
version = ifcopenshell_wrapper.version()
|
version = ifcopenshell_wrapper.version()
|
||||||
schema_identifier = ifcopenshell_wrapper.schema_identifier()
|
schema_identifier = ifcopenshell_wrapper.schema_identifier()
|
||||||
get_supertype = ifcopenshell_wrapper.get_supertype
|
get_supertype = ifcopenshell_wrapper.get_supertype
|
||||||
|
get_log = ifcopenshell_wrapper.get_log
|
||||||
|
|||||||
@@ -446,3 +446,17 @@ private:
|
|||||||
return IfcSchema::SchemaEntity(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;
|
||||||
|
}
|
||||||
|
%}
|
||||||
Reference in New Issue
Block a user