gz-sim
gz-sim copied to clipboard
Symlink to latest logs
Desired behavior
Each simulation run generates a timestamped log directory under ~/.ignition/gazebo/log
. It's not very convenient to find the log for the latest run, since you have to know the exact timestamp to go to. It usually takes me a few times clicking tab and looking at the clock to figure out what folder to open. I often just delete the entire log
directory between runs so that I can easily navigate directly to the only timestamp available.
It would be great to have a ~/.ignition/gazebo/log/latest
directory, which is always a symlink to the newest logs for quick access.
It probably only makes sense to do this when the user doesn't pass a custom --record-path
- we don't want the latest folder to point to a place outside of the ~/.ignition/gazebo/log
directory.
Alternatives considered
I can't think of any alternatives besides doing nothing.
Implementation suggestion
Here's where the log record path is used:
https://github.com/ignitionrobotics/ign-gazebo/blob/c08fc87e2b965ab388f6dc4a74f8668213ecae8f/src/ign.cc#L191-L192
Additional context
This idea is similar to how colcon
's logs have a latest
folder inside them.