Adjust verbosity of several log messages

This commit is contained in:
Thomas Krijnen
2018-12-29 12:34:32 +01:00
parent 2c8a79e186
commit e6f523a2b8
4 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -656,7 +656,7 @@ int main(int argc, char** argv)
if (!context_iterator.initialize()) {
/// @todo It would be nice to know and print separate error prints for a case where we found no entities
/// and for a case we found no entities that satisfy our filtering criteria.
Logger::Error("No geometrical entities found");
Logger::Notice("No geometrical elements found or none succesfully converted");
std::remove(output_temp_filename.c_str()); /**< @todo Windows Unicode support */
write_log(!quiet);
return EXIT_FAILURE;
+13 -13
View File
@@ -177,7 +177,7 @@ namespace {
std::pair<std::string, double> unit_info = k->initializeUnits(project->UnitsInContext());
unit_magnitude = unit_info.second;
} else {
Logger::Error("A single IfcProject is expected (encountered " + boost::lexical_cast<std::string>(projects->size()) + "); unable to read unit information.");
Logger::Warning("A single IfcProject is expected (encountered " + boost::lexical_cast<std::string>(projects->size()) + "); unable to read unit information.");
}
// Set precision from file
@@ -451,7 +451,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l
B.MakeCompound(C);
B.Add(C, complete_shape);
complete_shape = C;
Logger::Message(Logger::LOG_ERROR, "Multiple components in IfcConnectedFaceSet");
Logger::Warning("Multiple components in IfcConnectedFaceSet");
}
B.Add(complete_shape, result_shape);
}
@@ -466,7 +466,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l
B.MakeCompound(C);
B.Add(C, complete_shape);
complete_shape = C;
Logger::Message(Logger::LOG_ERROR, "Loose faces in IfcConnectedFaceSet");
Logger::Warning("Loose faces in IfcConnectedFaceSet");
}
B.Add(complete_shape, loose_faces.Current());
}
@@ -474,7 +474,7 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l
shape = complete_shape;
} else {
Logger::Message(Logger::LOG_WARNING, "Failed to sew faceset");
Logger::Error("Failed to sew faceset");
}
return valid_shell;
@@ -651,7 +651,7 @@ bool IfcGeom::Kernel::convert_openings(const IfcSchema::IfcProduct* entity, cons
fix.Perform();
brep_cut_result = fix.Shape();
} catch (...) {
Logger::Message(Logger::LOG_WARNING, "Shape healing failed on opening subtraction result", entity);
Logger::Error("Shape healing failed on opening subtraction result", entity);
}
BRepCheck_Analyzer analyser(brep_cut_result);
@@ -870,7 +870,7 @@ bool IfcGeom::Kernel::convert_wire_to_face(const TopoDS_Wire& w, TopoDS_Face& fa
TopTools_ListOfShape results;
if (wire_intersections(wire, results)) {
Logger::Error("Self-intersections with " + boost::lexical_cast<std::string>(results.Extent()) + " cycles detected");
Logger::Warning("Self-intersections with " + boost::lexical_cast<std::string>(results.Extent()) + " cycles detected");
select_largest(results, wire);
}
@@ -951,7 +951,7 @@ bool IfcGeom::Kernel::profile_helper(int numVerts, double* verts, int numFillets
if (fillet.IsDone()) {
face = TopoDS::Face(fillet.Shape());
} else {
Logger::Message(Logger::LOG_WARNING, "Failed to process profile fillets");
Logger::Error("Failed to process profile fillets");
}
}
@@ -1841,7 +1841,7 @@ std::pair<std::string, double> IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn
try {
IfcEntityList::ptr units = unit_assignment->Units();
if (!units || !units->size()) {
Logger::Message(Logger::LOG_ERROR, "No unit information found");
Logger::Warning("No unit information found");
} else {
for (IfcEntityList::it it = units->begin(); it != units->end(); ++it) {
IfcUtil::IfcBaseClass* base = *it;
@@ -1884,11 +1884,11 @@ std::pair<std::string, double> IfcGeom::Kernel::initializeUnits(IfcSchema::IfcUn
}
if (!length_unit_encountered) {
Logger::Error("No length unit encountered");
Logger::Warning("No length unit encountered");
}
if (!angle_unit_encountered) {
Logger::Error("No plane angle unit encountered");
Logger::Warning("No plane angle unit encountered");
}
return std::pair<std::string, double>(unit_name, unit_magnitude);
@@ -3590,7 +3590,7 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopoDS_Shap
fix.Perform();
result = fix.Shape();
} catch (...) {
Logger::Message(Logger::LOG_WARNING, "Shape healing failed on boolean result");
Logger::Error("Shape healing failed on boolean result");
}
} else {
@@ -3677,7 +3677,7 @@ bool IfcGeom::Kernel::boolean_operation(const TopoDS_Shape& a, const TopTools_Li
fix.Perform();
r = fix.Shape();
} catch (...) {
Logger::Message(Logger::LOG_WARNING, "Shape healing failed on boolean result");
Logger::Error("Shape healing failed on boolean result");
}
success = BRepCheck_Analyzer(r).IsValid() != 0;
@@ -3841,6 +3841,6 @@ IfcGeom::Kernel::faceset_helper::faceset_helper(Kernel* kernel, const IfcSchema:
}
if (loops_removed || (non_manifold && l->declaration().is(IfcSchema::IfcClosedShell::Class()))) {
Logger::Error(boost::lexical_cast<std::string>(loops_removed) + " loops removed and " + boost::lexical_cast<std::string>(non_manifold) + " non-manifold edges for:", l);
Logger::Warning(boost::lexical_cast<std::string>(loops_removed) + " loops removed and " + boost::lexical_cast<std::string>(non_manifold) + " non-manifold edges for:", l);
}
}
+4 -4
View File
@@ -149,7 +149,7 @@ namespace IfcGeom {
unit_name = length_unit.first;
unit_magnitude = length_unit.second;
} else {
Logger::Error("A single IfcProject is expected (encountered " + boost::lexical_cast<std::string>(projects->size()) + "); unable to read unit information.");
Logger::Warning("A single IfcProject is expected (encountered " + boost::lexical_cast<std::string>(projects->size()) + "); unable to read unit information.");
}
}
@@ -211,7 +211,7 @@ namespace IfcGeom {
boost::to_lower(context_type);
if (allowed_context_types.find(context_type) == allowed_context_types.end()) {
Logger::Message(Logger::LOG_ERROR, std::string("ContextType '") + context->ContextType() + "' not allowed:", context);
Logger::Warning(std::string("ContextType '") + context->ContextType() + "' not allowed:", context);
}
if (context_types.find(context_type) != context_types.end()) {
filtered_contexts->push(context);
@@ -270,12 +270,12 @@ namespace IfcGeom {
}
if (representations->size() == 0) {
Logger::Message(Logger::LOG_ERROR, "No representations encountered in relevant contexts, using all");
Logger::Warning("No representations encountered in relevant contexts, using all");
representations = ifc_file->instances_by_type<IfcSchema::IfcRepresentation>();
}
if (representations->size() == 0) {
Logger::Message(Logger::LOG_ERROR, "No representations encountered, aborting");
Logger::Warning("No representations encountered, aborting");
return false;
}
+1 -1
View File
@@ -523,6 +523,6 @@ void SvgSerializer::setFile(IfcParse::IfcFile* f) {
}
}
Logger::Error("No building storeys encountered, output might be invalid or missing");
Logger::Warning("No building storeys encountered, output might be invalid or missing");
}
}