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

how to change default logging verbosity

asked 2022-12-18 06:09:36 -0500

Using ROS2 when running a launch file it always start like this:

[INFO] [launch]: All log files can be found below <path_to_log>

[INFO] [launch]: Default logging verbosity is set to INFO

Is it possible to change this default verbosity?

I know that it is possible to change a Node execution verbosity using this:

--ros-args --log-level <log_level>

but what about the default verbosity when running a launch file? I cannot changed it from INFO

Thank you!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-18 13:04:36 -0500

ljaniec gravatar image

Please check out these:

E.g. for Foxy

launch_ros.actions.Node(
    package='demo_nodes_cpp',
    executable='talker',
    output='screen', 
    arguments=['--ros-args', '--log-level', 'debug']
)
edit flag offensive delete link more

Comments

Thank you for your response, this is actually what I am doing and i can set the logger of the node I am executing. However what I can't change is the default [INFO][launch] messages that appear when running a launch file.

For example, if you make a new ros2 package which cointains only the follwing launch file:

from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([               
        Node(
            package='teleop_twist_joy',
            executable='teleop_node',
            name='teleop_twist_joy_node',
            arguments=['--ros-args', '--log-level', 'fatal']),
         Node(
            package='joy', 
            executable='joy_node', 
            name='joy_node',
            arguments=['--ros-args', '--log-level', 'fatal'])
    ])

You still get the following output:

iggyrrieta gravatar image iggyrrieta  ( 2022-12-18 13:43:40 -0500 )edit

Log:

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [teleop_node-1]: process started with pid [13112]
[INFO] [joy_node-2]: process started with pid [13114]
iggyrrieta gravatar image iggyrrieta  ( 2022-12-18 13:44:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-12-18 06:09:36 -0500

Seen: 1,339 times

Last updated: Dec 18 '22