Invetigate improvements to logging within Tesseract #1153
Replies: 3 comments
-
FYI @johnwason @marip8 |
Beta Was this translation helpful? Give feedback.
-
So far I like spdlog
|
Beta Was this translation helpful? Give feedback.
-
I think we need to have a "record" structure that contains more information about the errors rather than just having string output. I'd like to have errors that are machine readable so that we can make decisions based on the output automatically. For example, we should have a string "code" like class ROBOTRACONTEUR_CORE_API RRLogRecord
{
public:
/** @brief The source node */
RR_WEAK_PTR<RobotRaconteurNode> Node;
/** @brief The log level */
RobotRaconteur_LogLevel Level;
/** @brief The source component */
RobotRaconteur_LogComponent Component;
/** @brief The source component name */
std::string ComponentName;
/** @brief The source component object ID */
std::string ComponentObjectID;
/** @brief The source endpoint */
int64_t Endpoint;
/** @brief The service path of the source object */
std::string ServicePath;
/** @brief The source member */
std::string Member;
/** @brief Human readable log message */
std::string Message;
/** @brief Time of logging event */
boost::posix_time::ptime Time;
/** @brief The sourcecode filename */
std::string SourceFile;
/** @brief The line within the sourcecode file */
uint32_t SourceLine;
/** @brief The source thread */
std::string ThreadID;
/** @brief The source coroutine fiber */
std::string FiberID;
RRLogRecord();
}; A more interesting example is the EventLog structure types from Robot Raconteur that are based on the types of log messages on industrial devices:
In Robot Raconteur an |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There are two areas identified.
Potential Console Bridge Replacements that allow Custom Sinks
libspdlog-dev
libboost-log-dev
libabsl-dev
LOG()
/CHECK()
macros with streaming API;absl::AddLogSink()
extensibilitylibeasyloggingpp-dev
libplog-dev
liblog4cplus-dev
AsyncAppender
for asyncliblog4cpp5-dev
AsyncAppender
implementationliblog4cxx-dev
AsyncAppender
supportBeta Was this translation helpful? Give feedback.
All reactions