mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 16:22:53 +00:00
get_log in python
This commit is contained in:
@@ -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