Skip to content
Snippets Groups Projects
Unverified Commit 27de764c authored by corentinberge's avatar corentinberge Committed by GitHub
Browse files

Update logger.cpp

Change the input mode to ostringstream
parent 30050eca
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#endif #endif
#define ENABLE_RT_LOG #define ENABLE_RT_LOG
#include <sstream>
#include <stdio.h> #include <stdio.h>
#include <iostream> #include <iostream>
#include <iomanip> // std::setprecision #include <iomanip> // std::setprecision
...@@ -65,7 +66,9 @@ namespace dynamicgraph ...@@ -65,7 +66,9 @@ namespace dynamicgraph
if( isStreamMsg(type)) if( isStreamMsg(type))
{ {
// check whether counter already exists // check whether counter already exists
string id = file+toString(line); std::ostringstream oss;
oss << file << line;
std::string id (oss.str());
map<string,double>::iterator it = m_stream_msg_counters.find(id); map<string,double>::iterator it = m_stream_msg_counters.find(id);
if(it == m_stream_msg_counters.end()) if(it == m_stream_msg_counters.end())
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment