Is it possible to control the size of log file ?
I code a very simple CPP node which spam rosout with a lot of ROS_INFO :
ros::Rate r(100.0);
std::string logLine;
for(int i = 0 ; i < 1024 ; ++i)
{
logLine.append("abcd ");
}
while(ros::ok())
{
r.sleep();
ROS_INFO_STREAM(logLine);
}
When I launch this node, I can see both log files "rosout.log" and "my_node_name-stdout.log" growing. When "rosout.log" is around 100Mo, the file is "rolled". A new file called rosout.log.1 is created, an rosout.log continue to be feeded with the ROS_INFO...
Look in the source code of rosout, I understand that this size is hard coded to 100 Mo (this is not a problem).
The problem is with the log file of my node. This file seems to be never splitted.
Is it possible to control the size of this log file ?
I try to understand the rosconsole source code, and this part of the roscpp client library. I guess that writting in the log file is done thanks to Log4CXX. Is it done with a FileAppender ? If yes, where is it instanciated ? And can we configure it in rosconsole.config ?
If I well understoud, roslaunch is responsible of redirecting stdout and stderr into log files (if the node is launched with argument output="log"). Does roslaunch can do file rolling ?
Thanks,