How do you simplify ROS's logging system so it doesn't generate a massive number of log files?
I'm trying to diagnose a problem with a specific node crashing upon launch. So, the first thing I want to check is its logging output. Sounds simple, right? Unfortunately, it's quite a headache. I went to the default log directory in ~/.ros/log
and I see:
What in the world is this? I have, maybe, 6 nodes running. Why are so many log files necessary? Where do I begin to find the one containing output from my node?
If this is the default, how do I override this so either:
- everything goes to a single easily searchable log file?
- name the log files by the name of the node that writes to them, instead of some meaningless UUID?
Originally posted by Cerin on ROS Answers with karma: 940 on 2018-01-02
Post score: 1
Original comments
Comment by lucasw on 2018-01-02:
Cut-and-paste text instead of screenshots of text is a lot easier to read and analyze.
Comment by Cerin on 2018-01-02:
You want me to cut and paste the ls
output showing the thousands of random log file names? How would that help you? Normally I'd agree that copy and paste is better, but not in this instance.
Comment by lucasw on 2018-01-02:
Just capture about a screens worth of output, it could be exactly what is in the existing image except text, or less since it will be a bit bigger due to font size. A ...
at the end could be added to say there is more output that has been excluded.
Comment by gvdhoorn on 2018-01-05:
Just an observation: from the screenshot it appears that someone/something is invoking rosservice
(the command line utility) about every 7 or 8 seconds. As @mig already explained, each invocation will result in a log file. That would seem to be the primary cause of the many log files.