Skip to content

Feature Request: Allow to disable logger by name #2190

@firesurfer

Description

@firesurfer

Feature request

Allow to disable a logger by name

Feature description

It would be nice to have a possibility to disable a certain logger completely from code. I have a c++ node which uses moveit internally. Moveit uses a lot of named loggers (e.g. moveit_robot_model.robot_model). As the logging information from some of these loggers is rather irrelevant and distracts from valuable information I would like to completely silence these loggers (at least from the console output) e.g. by calling something like:

rclcpp::get_logger("moveit_robot_model.robot_model").disable();

What I already tried was to set the logger level to Fatal or Error.

rclcpp::get_logger("moveit_robot_state.robot_model").set_level(rclcpp::Logger::Level::Fatal);

This didn't seem to work. (I would guess moveit sets the log level internally to something else, or there is some other magic happening?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions