-
Notifications
You must be signed in to change notification settings - Fork 101
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
logging: log4cxx support? #475
Comments
Ah, I think I've found my answer here: My use-case is that I'm wanting to output the logs in a JSON format. I've read the logging and config documentation here: My use-case includes adding custom fields to the output, so I don't think I'd simply be able to make use of the From what I can tell, I may need to implement a custom logger, but it's unclear to me:
|
Something like this may work for my use-case. Is there a way to specify custom spdlog formatters in config? |
@rr-tom-noble i think that you already found the original query with this issue. do you want to keep this open? IMO having formatter with spdlog, ros2/rcl_logging#92 would be the best place to discuss and closing this issue? |
Hi @fujitatomoya. Yeah, that makes sense. Thanks for confirming |
I think we have a resolution here (to move to a different issue), but I wanted to provide a couple of bits of additional context. First, most of the details on why we moved from log4cxx to spdlog can be found in ros2/build_farmer#189, ros2/rcl_logging#78, and ros2/rcl_logging#17. In short, log4cxx had a lot of issues surrounding the lifetime of objects at the time I looked at this, and moving to spdlog solved all of them. One other thing I'll mention is that, until ros2/rcl_logging#92 is solved, you should be able to take a different (though less efficient path). In particular, by default all logs go to the console, to disk, and to the network on the |
I'm currently using ROS noetic which I believe uses rosconsole / log4cxx for logging. This appears to be a widely used and customisable logging framework. As far as I can tell, it seems that ROS2 is using its own logging system?
Is there a plan to support log4cxx in the future? If not, what was the reason for moving away from it?
The text was updated successfully, but these errors were encountered: