diff --git a/include/dynamic-graph/logger.h b/include/dynamic-graph/logger.h
index 24a8faed3b983de7472da4e4cf17599fbf27bd97..278e7c22943233b7eec6df700e53a9a7bc4258e1 100644
--- a/include/dynamic-graph/logger.h
+++ b/include/dynamic-graph/logger.h
@@ -221,15 +221,16 @@ public:
    *    stream(type, lineId) << msg << '\n';
    *  \endcode
    */
-  void sendMsg(std::string msg, MsgType type, const std::string &lineId = "");
+  [[deprecated("use stream(type, lineId) << msg")]] void
+  sendMsg(std::string msg, MsgType type, const std::string &lineId = "");
 
   /** \deprecated instead, use
    *  \code
    *    stream(type, lineId) << msg << '\n';
    *  \endcode
    */
-  void sendMsg(std::string msg, MsgType type, const std::string &file,
-               int line) DYNAMIC_GRAPH_DEPRECATED;
+  [[deprecated("use stream(type, lineId) << msg")]] void
+  sendMsg(std::string msg, MsgType type, const std::string &file, int line);
 
   /** Set the sampling time at which the method countdown()
    * is going to be called. */
diff --git a/include/dynamic-graph/signal-ptr.h b/include/dynamic-graph/signal-ptr.h
index 5f2e8acae8491afb4fe22e8329cf4e90b5b5bb7e..c5dd7b45548adb9db8b36457d2858c4b689ad59a 100644
--- a/include/dynamic-graph/signal-ptr.h
+++ b/include/dynamic-graph/signal-ptr.h
@@ -9,8 +9,6 @@
 #include <dynamic-graph/exception-signal.h>
 #include <dynamic-graph/signal.h>
 
-#include <dynamic-graph/deprecated.hh>
-
 namespace dynamicgraph {
 /// \ingroup dgraph
 ///
diff --git a/src/dgraph/entity.cpp b/src/dgraph/entity.cpp
index 495cb9737cccb4c2542aad4a46e3d3dd678c84ea..e71eae1eac9a2fc2d80ed9c5c5041ee220d32735 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';
 }