change rclcpp logger sink or get all the sinks used by rclcpp
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
I have been trying to change the rclcpp logger sink to a rotating sink which is then be connected using fluentd to log to Elasticsearch. Is there any way to do this? I can do it if I used spdlog library but cannot do with external ROS libraries I am using.
- Operating System:
-Ubuntu 22.04 - Installation type:
- from source using bazel
- Client library (if applicable):
- rclcpp::logger or MARCOS --> RCLCPP_INFO();
Expected behavior
the sink is defined as this:-
---> std::make_sharedspdlog::sinks::rotating_file_sink_mt("/tmp/log/temp.log", 1048576 * 5, 1);
Actual behavior
spdlog is not able to find the loggers registered with rclcpp library even though it uses spdlog as the base.
Feature request
Maybe having a conversion function to convert from rclcpp logger to base spdlog logger
spdlog::logger convertTospdLogger(rclcpp::logger)
{}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation file or test. Start by examining how rclcpp::logger and RCLCPP_INFO() expose logging sinks, then compare that with the requested spdlog rotating_file_sink_mt and fluentd/Elasticsearch workflow; done means a clear supported way to replace or retrieve sinks, or a decision that conversion is unsupported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100