DebugSink.cpp
Go to the documentation of this file.
2 #include <g3log/loglevels.hpp>
3 #include <ros/console.h>
4 
5 using namespace swarmros;
6 using namespace swarmros::bridge;
7 
8 void DebugSink::ReceiveLogMessage(g3::LogMessageMover logEntry)
9 {
10  const auto& entry = logEntry.get();
11  if (entry._level == DBUG)
12  {
13  ROS_DEBUG_STREAM(entry.message());
14  }
15  else if (entry._level == INFO)
16  {
17  ROS_INFO_STREAM(entry.message());
18  }
19  else if (entry._level == WARNING)
20  {
21  ROS_WARN_STREAM(entry.message());
22  }
23  else if (entry._level == FATAL)
24  {
25  ROS_FATAL_STREAM(entry.message());
26  }
27 }
#define ROS_FATAL_STREAM(args)
#define ROS_WARN_STREAM(args)
#define ROS_DEBUG_STREAM(args)
#define ROS_INFO_STREAM(args)
void ReceiveLogMessage(g3::LogMessageMover logEntry)
Receives messages from g3log and forwards them to ROS.
Definition: DebugSink.cpp:8


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:47