Skip to main content

Robotiq::StderrLogger Class

Default Logger implementation that writes to stderr. Hosted-only: it needs <iostream> and a wall clock, neither of which a freestanding target has — provide an application Logger (e.g. a UART sink) there instead.

Thread-safe: writes are serialized across all instances, so they share the stream without garbling lines. The optional name tags every line: inject one instance into the SDK and keep another for application messages to tell them apart (a real integration gets the same separation from its injected adapter, e.g. a named rclcpp logger).

Included Headers

#include <stderr_logger.hpp>

Base class

classLogger

Minimal logging surface for Robotiq components. More...

Members

Public Constructors
StderrLogger (std::string name={})
Public Member Functions
voidlog (Level level, std::string_view message) override

Emit a fully-formatted log line. More...

Public Constructors

StderrLogger()

Robotiq::StderrLogger::StderrLogger(std::stringname = {}
)
explicit
Parameters
name

Optional tag prepended to every line this instance writes; empty by default (no tag).

Public Member Functions

log()

void Robotiq::StderrLogger::log(Levellevel,
std::string_viewmessage
)
virtual

Emit a fully-formatted log line.

Parameters
level

Severity of this line.

message

The already-formatted text to log. The sink decides where it goes (stderr, UART, rclcpp, ...); it does not format, timestamp, or filter by level.


The documentation for this class was generated from the following file:

  • stderr_logger.hpp

Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.