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

rclpy: Change the output format of the default logger (RcutilsLogger)

asked 2020-11-13 05:13:26 -0500

CraigH92 gravatar image

My log messages look like:

[INFO] [1605205588.116214862] [path_to_node.subsystem_name.node_name]: Here is a log message

The bit before the actual message takes up too much horizontal space, making it hard to read in my console (I'm using terminator, and have other consoles within it). I have already tried reducing the font size, but it still rarely fits on one line.

Could I change it so it is more like:

[INFO] [node_name]: Here is a log message

Or even:

[INFO]: Here is a log message

As often I do not care where the log message has come from.

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-11-13 06:42:15 -0500

CraigH92 gravatar image

Figured it out.

I just need to set an eninonment variable, i.e type:

export RCUTILS_CONSOLE_OUTPUT_FORMAT="[{severity}]: {message}"

Into the console, I am running the node from.

http://docs.ros2.org/bouncy/api/rcuti...

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-11-13 05:13:26 -0500

Seen: 663 times

Last updated: Nov 13 '20