Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG log doesn't show #423

Open
YuanYuYuan opened this issue Jan 16, 2025 · 1 comment
Open

DEBUG log doesn't show #423

YuanYuYuan opened this issue Jan 16, 2025 · 1 comment
Labels
backlog Long-term improvement or addition

Comments

@YuanYuYuan
Copy link
Contributor

YuanYuYuan commented Jan 16, 2025

We can't print out the DEBUG log even when we set the log severity to --log-level.

ros2 run demo_nodes_cpp listener --ros-args --log-level rmw_cyclonedds_cpp:=DEBUG
[INFO] [1737021295.175274629] [DBG]: =======================
[WARN] [1737021295.175300568] [DBG]: =======================
[ERROR] [1737021295.175302982] [DBG]: =======================
2025-01-16T09:54:55.189082Z  INFO ThreadId(02) zenoh::net::runtime: Using ZID: b28720221a3472a6c064f3ec796fc283
2025-01-16T09:54:55.191102Z  INFO ThreadId(02) zenoh::net::runtime::orchestrator: Zenoh can be reached at: tcp/[::1]:41651
[INFO] [1737021295.325765962] [DBG]: =======================
[WARN] [1737021295.325797712] [DBG]: =======================
[ERROR] [1737021295.325802260] [DBG]: =======================
^C[INFO] [1737021296.258484803] [rclcpp]: signal_handler(signum=2)
2025-01-16T09:54:56.263955Z  INFO ThreadId(02) zenoh::api::session: close session zid=b28720221a3472a6c064f3ec796fc283

The cause might be we don't properly hook the logging mask with the upstream.

I've tested it with cyclondedds and fastrtps, which work normally.

ros2 run demo_nodes_cpp listener --ros-args --log-level rmw_cyclonedds_cpp:=DEBUG
[DEBUG] [1737020808.862103857] [rmw_cyclonedds_cpp]: Config XML is <CycloneDDS><Domain><Discovery><ParticipantIndex>auto</ParticipantIndex><MaxAutoParticipantIndex>32</MaxAutoParticipantIndex></Discovery></Domain></CycloneDDS>,
[DEBUG] [1737020808.868789303] [rmw_cyclonedds_cpp]: ************ Service Details *********
[DEBUG] [1737020808.868816113] [rmw_cyclonedds_cpp]: Sub Topic rq/listener/get_parametersRequest
[DEBUG] [1737020808.868819720] [rmw_cyclonedds_cpp]: Pub Topic rr/listener/get_parametersReply
[DEBUG] [1737020808.868822726] [rmw_cyclonedds_cpp]: ***********

BTW, I've tested it with the RCUTILS logging tools. It still can't print the debug log and the deadlock issue seems unresolved with the recent changes.

@Yadunund
Copy link
Member

Maybe we can look at what global variables RCUITLS logger is accessing to set it's log severity and appropriately call rmw_set_log_severity in rmw_init

@Yadunund Yadunund added the backlog Long-term improvement or addition label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Long-term improvement or addition
Projects
None yet
Development

No branches or pull requests

2 participants