Git Product home page Git Product logo

Comments (4)

fujitatomoya avatar fujitatomoya commented on July 19, 2024

spdlog is not able to find the loggers registered with rclcpp library even though it uses spdlog as the base.

no, this is what we cannot do right now with rcl_logging_spdlog. it statically uses spdlog::sinks::basic_file_sink_mt only.

https://github.com/ros2/rcl_logging/blob/014239dd80ab3de2a847af80f23d24da6438ecb7/rcl_logging_spdlog/src/rcl_logging_spdlog.cpp#L177

actually rclcpp (precisely rcl) does not know logging implementation but rcl_logging_interface.
that means user can create own implementation to support those interfaces for ROS 2 logger. (we actually do this with our proprietary lock-free in-memory logger implementation.)

probably easiest way for you would be to replace spdlog::sinks::basic_file_sink_mt into spdlog::sinks::rotating_file_sink_mt in source code, and build it with your colcon workspace.

for long term, there is parameter argument --log-config-file with ros2 command to load the external logger configuration to the logger implementation. so that in rcl_logging_xxx can set up the configuration based on this config file. but it is not supported yet for rcl_logging_spdlog.

https://github.com/ros2/rcl_logging/blob/014239dd80ab3de2a847af80f23d24da6438ecb7/rcl_logging_spdlog/src/rcl_logging_spdlog.cpp#L107-L111

it would be appreciated if you consider the contribution, but we would want to have discussion what setting configuration should be supported for rcl_logging_spdlog.

from rclcpp.

fujitatomoya avatar fujitatomoya commented on July 19, 2024

@clalancette i think we can move this issue to https://github.com/ros2/rcl_logging. what do you think?

from rclcpp.

jrutgeer avatar jrutgeer commented on July 19, 2024

we actually do this with our proprietary lock-free in-memory logger implementation

Interesting. Any chance on open-sourcing that one?

from rclcpp.

fujitatomoya avatar fujitatomoya commented on July 19, 2024

unfortunately no, we do not have any plan for that.

from rclcpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.