We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce815d6 commit 842dcbbCopy full SHA for 842dcbb
can/io/logger.py
@@ -406,12 +406,12 @@ def _default_name(self) -> StringPathLike:
406
"""Generate the default rotation filename."""
407
path = pathlib.Path(self.base_filename)
408
new_name = (
409
- path.stem
410
- + "_"
411
- + datetime.now().strftime("%Y-%m-%dT%H%M%S")
412
413
- + f"#{self.rollover_count:03}"
414
- + path.suffix
+ path.stem.split(".")[0]
+ + "_"
+ + datetime.now().strftime("%Y-%m-%dT%H%M%S")
+ + f"#{self.rollover_count:03}"
+ + "".join(path.suffixes[-2:])
415
)
416
return str(path.parent / new_name)
417
0 commit comments