Linux driver got default logger that dumps everything into stderr

This commit is contained in:
Pavel Kirienko
2014-04-11 19:02:24 +04:00
parent 3b0b0494b8
commit 6435c82d06
2 changed files with 22 additions and 15 deletions
@@ -7,18 +7,6 @@
#include <uavcan/protocol/node_status_monitor.hpp>
#include "debug.hpp"
class LogSink : public uavcan::ILogSink
{
virtual void log(const uavcan::protocol::debug::LogMessage& message)
{
std::cout << "--- LOCAL LOG ---\n"
<< message << "\n"
<< "-----------------" << std::endl;
}
};
static LogSink log_sink_;
static uavcan_linux::NodePtr initNode(const std::vector<std::string>& ifaces, uavcan::NodeID nid,
const std::string& name)
{
@@ -31,7 +19,6 @@ static uavcan_linux::NodePtr initNode(const std::vector<std::string>& ifaces, ua
node->setName(name.c_str());
node->getLogger().setLevel(uavcan::protocol::debug::LogLevel::DEBUG);
node->getLogger().setExternalSink(&log_sink_);
/*
* Starting the node. This may take a few seconds.