Commit d48a3221 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by olivier stasse
Browse files

Update to changes in dynamic-graph

parent 2981e7b8
...@@ -458,19 +458,19 @@ PyObject* setLoggerVerbosityLevel( ...@@ -458,19 +458,19 @@ PyObject* setLoggerVerbosityLevel(
try { try {
switch (verbosityLevel) { switch (verbosityLevel) {
case 0: case 8:
entity->setLoggerVerbosityLevel(VERBOSITY_ALL); entity->setLoggerVerbosityLevel(VERBOSITY_ALL);
break; break;
case 1: case 4:
entity->setLoggerVerbosityLevel(VERBOSITY_INFO_WARNING_ERROR); entity->setLoggerVerbosityLevel(VERBOSITY_INFO_WARNING_ERROR);
break; break;
case 2: case 2:
entity->setLoggerVerbosityLevel(VERBOSITY_WARNING_ERROR); entity->setLoggerVerbosityLevel(VERBOSITY_WARNING_ERROR);
break; break;
case 3: case 1:
entity->setLoggerVerbosityLevel(VERBOSITY_ERROR); entity->setLoggerVerbosityLevel(VERBOSITY_ERROR);
break; break;
case 4: case 0:
entity->setLoggerVerbosityLevel(VERBOSITY_NONE); entity->setLoggerVerbosityLevel(VERBOSITY_NONE);
break; break;
default: default:
......
...@@ -73,11 +73,11 @@ class VerbosityLevel(Enum): ...@@ -73,11 +73,11 @@ class VerbosityLevel(Enum):
""" """
Enum class for setVerbosityLevel Enum class for setVerbosityLevel
""" """
VERBOSITY_ALL = 0 VERBOSITY_ALL = 8
VERBOSITY_INFO_WARNING_ERROR = 1 VERBOSITY_INFO_WARNING_ERROR = 4
VERBOSITY_WARNING_ERROR = 2 VERBOSITY_WARNING_ERROR = 2
VERBOSITY_ERROR = 3 VERBOSITY_ERROR = 1
VERBOSITY_NONE = 4 VERBOSITY_NONE = 0
class Entity(object): class Entity(object):
...@@ -271,13 +271,13 @@ class Entity(object): ...@@ -271,13 +271,13 @@ class Entity(object):
Returns the entity's verbosity level (as a dynamic_graph.entity.VerbosityLevel) Returns the entity's verbosity level (as a dynamic_graph.entity.VerbosityLevel)
""" """
r = wrap.entity_get_logger_verbosity(self.obj) r = wrap.entity_get_logger_verbosity(self.obj)
if r == 0: if r == 8:
return VerbosityLevel.VERBOSITY_ALL return VerbosityLevel.VERBOSITY_ALL
elif r == 1: elif r == 4:
return VerbosityLevel.VERBOSITY_INFO_WARNING_ERROR return VerbosityLevel.VERBOSITY_INFO_WARNING_ERROR
elif r == 2: elif r == 2:
return VerbosityLevel.VERBOSITY_WARNING_ERROR return VerbosityLevel.VERBOSITY_WARNING_ERROR
elif r == 3: elif r == 1:
return VerbosityLevel.VERBOSITY_ERROR return VerbosityLevel.VERBOSITY_ERROR
return VerbosityLevel.VERBOSITY_NONE return VerbosityLevel.VERBOSITY_NONE
......
...@@ -48,18 +48,16 @@ class CustomEntity : public Entity { ...@@ -48,18 +48,16 @@ class CustomEntity : public Entity {
double &update(double &res, const int &inTime) { double &update(double &res, const int &inTime) {
const double &aDouble = m_sigdSIN(inTime); const double &aDouble = m_sigdSIN(inTime);
res = aDouble; res = aDouble;
std::ostringstream oss; logger().stream(MSG_TYPE_ERROR) << "start update " << res << '\n';
oss << "start update " << res; DYNAMIC_GRAPH_ENTITY_DEBUG (*this) << "This is a message of level MSG_TYPE_DEBUG\n";
sendMsg(oss.str().c_str(), MSG_TYPE_ERROR); DYNAMIC_GRAPH_ENTITY_INFO (*this) << "This is a message of level MSG_TYPE_INFO\n";
sendMsg("This is a message of level MSG_TYPE_DEBUG", MSG_TYPE_DEBUG, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_WARNING (*this) << "This is a message of level MSG_TYPE_WARNING\n";
sendMsg("This is a message of level MSG_TYPE_INFO", MSG_TYPE_INFO, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_ERROR (*this) << "This is a message of level MSG_TYPE_ERROR\n";
sendMsg("This is a message of level MSG_TYPE_WARNING", MSG_TYPE_WARNING, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_DEBUG_STREAM (*this) << "This is a message of level MSG_TYPE_DEBUG_STREAM\n";
sendMsg("This is a message of level MSG_TYPE_ERROR", MSG_TYPE_ERROR, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_INFO_STREAM (*this) << "This is a message of level MSG_TYPE_INFO_STREAM\n";
sendMsg("This is a message of level MSG_TYPE_DEBUG_STREAM", MSG_TYPE_DEBUG_STREAM, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_WARNING_STREAM (*this) << "This is a message of level MSG_TYPE_WARNING_STREAM\n";
sendMsg("This is a message of level MSG_TYPE_INFO_STREAM", MSG_TYPE_INFO_STREAM, __FILE__, __LINE__); DYNAMIC_GRAPH_ENTITY_ERROR_STREAM (*this) << "This is a message of level MSG_TYPE_ERROR_STREAM\n";
sendMsg("This is a message of level MSG_TYPE_WARNING_STREAM", MSG_TYPE_WARNING_STREAM, __FILE__, __LINE__); logger().stream(MSG_TYPE_ERROR) << "end update\n";
sendMsg("This is a message of level MSG_TYPE_ERROR_STREAM", MSG_TYPE_ERROR_STREAM, __FILE__, __LINE__);
sendMsg("end update", MSG_TYPE_ERROR, __FILE__, __LINE__);
return res; return res;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment