Update log filenames to be less confusing across platforms
See original GitHub issueWhat I’m seeing on OSX is that the plot filenames in the file browser (Finder.app) look like
2021-04-21-09/08/55.log
this is quite odd given the filesystem uses forward slashes as directories. When I check the dir in terminal via ls
etc it looks like this:
2021-04-20-23\:13\:57.log
So I think perhaps because of my filesystem (APFS in this case) or the OS I’m seeing two totally different things which makes understanding and debugging and support more challenging.
Checking the source, i see it is using colons, so i know that is what plotman is saving.
The backslashes in CLI make sense (it does the same thing for spaces), however the display in Finder is really weird to me.
Thoughts on avoiding colons to make things more compatible? I think YYYYMMDD-HHMMSS would still sort nicely and be readable if needed. BTW should log names be more precise than seconds to avoid collisions ever?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
I think Windows bans colons outright. It would be nice to use a standardized format, but I’m not sure one exists that is file name compatible. https://github.com/ericaltendorf/plotman/issues/108#issuecomment-817763506 ISO8601 with
:
->-
might be as close as we get. I’d personally keep the seconds. I’d rather have 60x the resolution I need than 0.9x. Maybe even the time zone. And yes, I did actually have two plotters set with different time zones… Regardless, I suppose the code should have a fall back in case of collision.@altendky and I talked about this for a bit and ended up with the plan to:
:
with_
to ensure cross platform compatibility.123412
. This will ensure that collisions do not occur even at scale (someone could be plotting on many machines and consolidating logs for analysis?)+hh:mm
or-hh:mm
so that the log names have comprehensive time information present. We looked into it and+
shouldn’t be a problem in the filename