ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Does ros have rolling log files/ ability to limit total size ?

asked 2016-03-23 10:06:36 -0600

cnanda84 gravatar image

Hi, I am using ROS indigo. I am creating a custom config file for my project that helps me to control the size of the log files,and define it if should be rolling . Is there a way to limit / control the size of default ros log that goes into .ros/log ? Or define the number of files it can generate after which it starts overwriting the first file ?

So it is more of a system maintenance question, will the logs files roll over once it crosses a certain limit or will it continue creating new logs files ?

Do I have to write a script to take care of that ?

-Best c-nanda

edit retag flag offensive close merge delete

Comments

Anyone has a comment? Did I explain the question well enough ?

cnanda84 gravatar image cnanda84  ( 2016-03-29 08:27:58 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-04-22 02:04:19 -0600

gvdhoorn gravatar image

So it is more of a system maintenance question, will the logs files roll over once it crosses a certain limit or will it continue creating new logs files ?

See Is it possible to control the size of log file ? for a related question. Apparently there is some support (rosout.log limited to 100MB and rolled-over at that point, but other logs will currently not (2016-04-22)). ros/ros_comm#551 seems to extend / complete this.

I'm not entirely sure of the implications of 551, but as rosconsole in the end logs through log4cxx, it might be possible (right now, as an alternative to 551 or in combination with it) to configure log4cxx to use its syslog appender. That should allow you to configure whatever tool rotates logs (such as logrotate) fi, to get what you're after.

edit flag offensive delete link more
0

answered 2016-04-21 16:25:57 -0600

cnanda84 gravatar image

I assume that I will have to write a script to monitor that . So closing the topic.

edit flag offensive delete link more

Comments

1

did you succeed in writing such a script? Mind to share?

Simon Schmeisser gravatar image Simon Schmeisser  ( 2017-02-14 11:30:32 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-03-23 10:06:36 -0600

Seen: 3,520 times

Last updated: Apr 22 '16