From 5fde0e3abfc13fffbe9894e95116eeeefaf5321d Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Thu, 2 Sep 2021 12:58:32 +0200
Subject: [PATCH] entity: update stream
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

fix:

…/dynamic-graph/src/dgraph/entity.cpp: In member function ‘void dynamicgraph::Entity::sendMsg(const string&, dynamicgraph::MsgType, const string&)’:
…/dynamic-graph/src/dgraph/entity.cpp:212:52: warning: ‘void dynamicgraph::Logger::sendMsg(std::__cxx11::string, dynamicgraph::MsgType, const string&)’ is deprecated: use stream(type, lineId) << msg [-Wdeprecated-declarations]
   logger_.sendMsg("[" + name + "]" + msg, t, lineId);
                                                    ^
In file included from …/dynamic-graph/include/dynamic-graph/entity.h:18:0,
                 from …/dynamic-graph/src/dgraph/entity.cpp:13:
…/dynamic-graph/include/dynamic-graph/logger.h:225:3: note: declared here
   sendMsg(std::string msg, MsgType type, const std::string &lineId = "");
   ^~~~~~~

ref. #58
---
 src/dgraph/entity.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dgraph/entity.cpp b/src/dgraph/entity.cpp
index 495cb97..e71eae1 100644
--- a/src/dgraph/entity.cpp
+++ b/src/dgraph/entity.cpp
@@ -209,5 +209,5 @@ Command *Entity::getNewStyleCommand(const std::string &commandName) {
 
 void Entity::sendMsg(const std::string &msg, MsgType t,
                      const std::string &lineId) {
-  logger_.sendMsg("[" + name + "]" + msg, t, lineId);
+  logger_.stream(t, lineId) << "[" << name << "]" << msg << '\n';
 }
-- 
GitLab