ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Is it possible to change the logger without building ROS packages (ROS2)

asked 2020-11-25 05:14:01 -0500

MHx gravatar image

Is it possible to change the logger, spdlog to log4cxx, without having to rebuild individual ros packages?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-12-18 13:38:15 -0500

sloretz gravatar image

Unfortunately you'll need to rebuild rcl. rcl picks the logger to use at compile time, which by default is rcl_logging_spdlog.

Add rcl_logging_log4cxx and rcl to your workspace, then choose the logging implementation by setting the environment variable RCL_LOGGING_IMPLEMENTATION.

export RCL_LOGGING_IMPLEMENTATION=rcl_logging_log4cxx
colcon build --cmake-clean-cache --packages-select rcl_logging_log4cxx rcl

There may be more relevant info in this thread:

edit flag offensive delete link more

Question Tools



Asked: 2020-11-25 05:14:01 -0500

Seen: 242 times

Last updated: Dec 18 '20