Save a log file

Hi,

While a node is running, I want to save all logs into a log file.

How can I do in ROS2 python?

Thanks

Hi @NguyenDuyDuc ,

I would recommend you to have a look into this link: ROS2 Logging

There you can find things that can help you like setting an environment variable to a log file, accessing the default logging directory and writing/saving logs into a custom file.

Regards,
Girish