Changing where logging occurs from within roslaunch
Hello,
I currently have a robot that, when it powers on, runs a .launch file that launches all of my nodes. It also logs any errors or warnings that occur through rosout, as it likely should. Unfortunately, if an error does occur, or the robot has to shutdown, it is difficult to find the log files pertaining to those errors. My question is twofold:
1. Is it possible to change the logging directory from within roslaunch. I have tried changing the environment variable as so:
< launch>
< env name="ROS_LOG_DIR" value="$(find OryxManager)/logs" />
....NODES HERE....
< /launch>
But it still logs them to .ros/log. Any suggestions?
2. Is it possible to change which sub-folder the logs are stored in? Currently, it is based off of the run_id. Unfortunately, the run_id is a random string, and it is difficult to tell what the previous run_id if robot powered off. Would it be possible to either change the run_id, or change the logging folder name, to be something else. Bonus points if there is a way to name it based off of something more intuitive like the system time.
If there isn't any way to do this, we may have to write our own method of logging. This would be possible, but not ideal. I would greatly appreciate any advice you can provide.
Thank you,
-Joe