From 63876fa97d20f3a71568074b84db4a558dadfbd2 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 20 Dec 2012 09:24:22 +0100 Subject: [PATCH] Using logog for logging within class MeshLib::Element. --- MeshLib/Elements/Element.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp index 7e24dbdabc3..5ab217cc28b 100644 --- a/MeshLib/Elements/Element.cpp +++ b/MeshLib/Elements/Element.cpp @@ -10,6 +10,8 @@ * Created on 2012-05-02 by Karsten Rink */ +#include "logog/include/logog.hpp" + #include "Element.h" #include "Node.h" #include "Edge.h" @@ -74,7 +76,7 @@ const Element* Element::getEdge(unsigned i) const nodes[1] = const_cast<Node*>(getEdgeNode(i,1)); return new Edge(nodes); } - std::cerr << "Error in MeshLib::Element::getEdge() - Index does not exist." << std::endl; + ERR("Error in MeshLib::Element::getEdge() - Index does not exist."); return NULL; } @@ -95,7 +97,7 @@ const Element* Element::getNeighbor(unsigned i) const { if (i < getNNeighbors()) return _neighbors[i]; - std::cerr << "Error in MeshLib::Element::getNeighbor() - Index does not exist." << std::endl; + ERR("Error in MeshLib::Element::getNeighbor() - Index does not exist."); return NULL; } @@ -112,7 +114,7 @@ const Node* Element::getNode(unsigned i) const { if (i < getNNodes()) return _nodes[i]; - std::cerr << "Error in MeshLib::Element::getNode() - Index " << i << " in " << MshElemType2String(getGeomType()) << " does not exist." << std::endl; + ERR("Error in MeshLib::Element::getNode() - Index %d in %s", i, MshElemType2String(getGeomType()).c_str()); return NULL; } @@ -126,7 +128,7 @@ unsigned Element::getNodeIndex(unsigned i) const { if (i<getNNodes()) return _nodes[i]->getID(); - std::cerr << "Error in MeshLib::Element::getNodeIndex() - Index does not exist." << std::endl; + ERR("Error in MeshLib::Element::getNodeIndex() - Index does not exist."); return std::numeric_limits<unsigned>::max(); } -- GitLab