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

Categorizing Log Level

asked 2021-01-29 09:35:15 -0500

yemre0642 gravatar image

Hi all,

I have /rosout logs which already levelled by following: DEBUG, INFO, WARN, ERROR, and FATAL. I need to categorize these a bit detailed way. For example, I have a UR10 robot arm and all logs in INFO level. I need something like this: Initializing, trajectory calculated, robot running and robot completed its job. Is there any convenient way to achieve this goal or should I create my own event mechanism for it?

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-29 10:14:12 -0500

gvdhoorn gravatar image

Not sure whether this is what you describe as "categorizing", but there is support for "named loggers". See roscpp/Overview/Logging:

The named versions output to a logger that is a child of the default one. This allows you to configure different logging statements to be enabled/disabled based on their name. For example:

#include <ros/console.h>
ROS_DEBUG_NAMED("test_only", "Hello %s", "World");
ROS_DEBUG_STREAM_NAMED("test_only", "Hello " << "World");

You won't be able to change the way other nodes log with that though.

Only how your own nodes log things.

edit flag offensive delete link more

Comments

Hi, I don't want to add or use new log level tags in my code; I want to separate INFO logs in details. It looks like I should create my own event system for it. Thanks for your reply.

yemre0642 gravatar image yemre0642  ( 2021-01-31 07:45:42 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-01-29 09:35:15 -0500

Seen: 79 times

Last updated: Jan 29 '21