frc1678/C2022-Public

logging system dirname change

Closed this issue · 1 comments

Right now the logging directory is created based on:

            DateFormat sdf = new SimpleDateFormat("dd:MM:yy:HH:mm:ss");

I suggest we do two things to this:

  1. use -'s instead :'s as it turns out :s get in the way of easy scp/similar commands that use colons to detect host names
  2. flip the date format so that year comes first for better sorting: yy-MM-dd (don't get me started on Java's broken date string specifications that completely changes from standard convention used by other languages)
  3. optionally drop the seconds specifier -- you're not going to reboot sub-seconds.
  4. use zero-padding in the log numbers so they sort right, especially when time is broken because the robot hasn't synced time properly yet. So logs instead of starting with 99- should start with 00099-. I'd recommend 5 digits for padding as I could see us going over 4, but it's unlikely we'd ever go over 5 (and if we did, space would likely be gone anyway).

note: updated description with a new 4th suggestion