mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +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()
|
||||
schema_identifier = ifcopenshell_wrapper.schema_identifier()
|
||||
get_supertype = ifcopenshell_wrapper.get_supertype
|
||||
get_log = ifcopenshell_wrapper.get_log
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
%}
|
||||
Reference in New Issue
Block a user