rclcpp
master
C++ ROS Client Library API
|
Go to the documentation of this file.
15 #ifndef RCLCPP__LOGGER_HPP_
16 #define RCLCPP__LOGGER_HPP_
25 #include "rcpputils/filesystem_helper.hpp"
37 #ifndef RCLCPP_LOGGING_ENABLED
38 #define RCLCPP_LOGGING_ENABLED 1
45 namespace node_interfaces
107 friend ::rclcpp::node_interfaces::NodeLogging;
122 : name_(new
std::string(name)) {}
128 Logger(
const Logger &) =
default;
143 return name_->c_str();
165 return Logger(*name_ +
"." + suffix);
181 #endif // RCLCPP__LOGGER_HPP_
@ Debug
The debug log level.
Logger get_logger(const std::string &name)
Return a named logger.
RCUTILS_LOG_SEVERITY_DEBUG
rcpputils::fs::path get_logging_directory()
Get the current logging directory.
@ Error
The error log level.
Level
An enum for the type of logger level.
Definition: logger.hpp:95
This header provides the get_node_base_interface() template function.
Definition: allocator_common.hpp:24
#define RCLCPP_PUBLIC
Definition: visibility_control.hpp:50
RCUTILS_LOG_SEVERITY_INFO
Definition: logger.hpp:91
const char * get_name() const
Get the name of this logger.
Definition: logger.hpp:138
@ Info
The info log level.
RCUTILS_LOG_SEVERITY_UNSET
RCUTILS_LOG_SEVERITY_FATAL
Logger get_node_logger(const rcl_node_t *node)
Return a named logger using an rcl_node_t.
void set_level(Level level)
Set level for current logger.
Logger get_child(const std::string &suffix)
Return a logger that is a descendant of this logger.
Definition: logger.hpp:160
RCUTILS_LOG_SEVERITY_ERROR
@ Fatal
The fatal log level.
RCUTILS_LOG_SEVERITY_WARN
@ Warn
The warn log level.
@ Unset
The unset log level.