logging with files, folders, levels, loggers
I am trying to get a grasp on the logging options in ROS.
I am using a mixture of python and c++ nodes. Please help me with (some of) my questions below:
- Can I control the naming of the log folders? Right now the folders are named in this style: '37d06130-cb7f-11e7-9515-0242102e2199'. For example: can I prepend a timestamp?
- Can I control when a new log folder is created? For example: force to start a new folder every hour?
- Can I programmatically start a new log folder? For example: start a new folder whenever a certain scenario is being started by a user.
- Can I control the total disk space allowed for log files? Right now ROS warns about a limit of 1GB being exceeded, I want to change this limit.
- Can I make ROS auto purge the oldest log files when hitting the disk space limit? Right now ROS tells me to manually run "rosclean".
- I have found that my c++ nodes needs
setvbuf(stdout, NULL, _IOLBF, 4096);
to ensure that the logging messages are flushed at the time when I need to inspect the logs. Is that really the way to do it? Is there a way to tell ROS manually at a certain point in time: please flush to all files now? - When logging with roscpp and the levels ROS_ERROR and/or ROS_FATAL, the messages do not appear in the log files, only in the console. I find that very frustrating. Can this be changed?
- (Now we are at it:) please also see my question on sublogs
add a comment