Out of line Logger methods

This commit is contained in:
Pavel Kirienko
2014-04-08 23:07:36 +04:00
parent dd38c38ff2
commit 9e5115948b
2 changed files with 37 additions and 24 deletions
+16
View File
@@ -34,4 +34,20 @@ int Logger::log(const protocol::debug::LogMessage& message)
return retval;
}
#if UAVCAN_CPP_VERSION < UAVCAN_CPP11
int Logger::log(LogLevel level, const char* source, const char* text)
{
if (level >= level_ || level >= getExternalSinkLevel())
{
msg_buf_.level.value = level;
msg_buf_.source = source;
msg_buf_.text = text;
return log(msg_buf_);
}
return 0;
}
#endif
}