LoggerROS Class
A ROS-specialized implementation of LoggerBase that publishes the error message on a topic and logs it through an rclcpp Logger. More...
Declaration
Included Headers
Base class
| class | LoggerBase |
|
Base class to allow Behaviors to report messages with detailed explanations to MoveIt Studio UI. More... | |
Public Constructors Index
| LoggerROS (const std::shared_ptr< rclcpp::Node > &node) | |
Public Member Functions Index
| void | publishMessage (const int32_t log_level, const std::string &details) override |
|
Publishes message to ROS topic and logs to console. More... | |
| void | publishMessage (const int32_t log_level, const std::string &source_name, const std::string &details) |
|
Function to publish a message. More... | |
| void | publishMessage (const int32_t log_level, const std::string &details) |
|
Function to publish a message. The default implementation logs to spdlog. LoggerROS is a good example of a subclass that overrides this, in which it publishes the message to a ROS topic and also calls this superclass function to also log to console. More... | |
Private Member Attributes Index
| rclcpp::Publisher< moveit_studio_agent_msgs::msg::Log >::SharedPtr | publisher_ |
|
Publisher for the log topic. More... | |
Description
A ROS-specialized implementation of LoggerBase that publishes the error message on a topic and logs it through an rclcpp Logger.
Definition at line 207 of file logger.hpp.
Public Constructors
LoggerROS()
| explicit |
Constructor for LoggerROS.
- Parameters
-
node rclcpp Node used when creating the log publisher.
Declaration at line 217 of file logger.hpp, definition at line 184 of file logger.cpp.
Public Member Functions
publishMessage()
| virtual |
Publishes message to ROS topic and logs to console.
- Parameters
-
log_level moveit_studio_agent_msgs::msg::Log::ERROR/WARN/INFO/DEBUG
details Contains the information message
Declaration at line 224 of file logger.hpp, definition at line 189 of file logger.cpp.
publishMessage()
|
Function to publish a message.
- Parameters
-
log_level moveit_studio_agent_msgs::msg::Log::ERROR/WARN/INFO/DEBUG
source_name Name used to identify the source of the log.
details Contains the information message
Declaration at line 211 of file logger.hpp, definition at line 72 of file logger.cpp.
publishMessage()
| virtual |
Function to publish a message. The default implementation logs to spdlog. LoggerROS is a good example of a subclass that overrides this, in which it publishes the message to a ROS topic and also calls this superclass function to also log to console.
- Parameters
-
log_level moveit_studio_agent_msgs::msg::Log::ERROR/WARN/INFO/DEBUG
details Contains the information message
Declaration at line 211 of file logger.hpp, definition at line 136 of file logger.cpp.
Private Member Attributes
publisher_
|
Publisher for the log topic.
Definition at line 230 of file logger.hpp.
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.