0
$\begingroup$

Rosanswers logo

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:

image description

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:

  1. everything goes to a single easily searchable log file?
  2. 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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I was using robot_upstart to launch my all.launch, and apparently this package is still very buggy and unstable in 16.04, and no longer outputs any logging information to its documented upstart log file. I replaced this with supervisor, and my all.launch now works perfectly.


Originally posted by Cerin with karma: 940 on 2018-01-05

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by 130s on 2020-03-31:
For the honor of robot_upstart, I use it at the production system dev for years and have never seen the issue like you described in the OP. I understand your frustration, and I have no way to disagree with your observation, but if you claim an OSS package to be "buggy" and "unstable", I'd much appreciate providing more concrete analysis.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.