Skip to content
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5c23248
Generalize the RotatingLogger; size, time or both constraint
j-c-cook Aug 7, 2022
7970ce1
Merge branch 'develop' into issue1364_TimedRotatingLogger
j-c-cook Aug 11, 2022
019e41c
Update test_log_virtual_sizedlogger to have a file path
j-c-cook Aug 11, 2022
e091ba0
Update logger doc string
j-c-cook Aug 11, 2022
5be3a81
Move rollover time reset to capture when file_size triggers
j-c-cook Aug 11, 2022
89bf921
Merge branch 'develop' into issue1364_TimedRotatingLogger
Sep 29, 2022
0cf8383
Change `delta_t` to `max_seconds`
Sep 29, 2022
cd36995
Run logger test on `RotatingLogger` rather than `SizedRotatingLogger`
Sep 29, 2022
c9ba894
Modify timeout period name and call Rotating if `file_time`
Sep 29, 2022
dc75109
Add test for the timed logger given `file_time` input
Sep 29, 2022
22bf537
Update logger help statement
Sep 29, 2022
83b901e
Merge branch 'develop' into issue1364_TimedRotatingLogger
j-c-cook Dec 20, 2022
0a89a6c
Merge branch 'develop' into issue1364_TimedRotatingLogger
j-c-cook Dec 27, 2022
c3d8715
Update can/logger.py
j-c-cook Dec 28, 2022
b6b75b9
Adjust the example in docstring and update documentation
j-c-cook Dec 28, 2022
a830c7a
Update the deprecation warning message
j-c-cook Dec 28, 2022
2862573
Fix doc string build warning
j-c-cook Dec 28, 2022
78f777c
Merge branch 'develop' into issue1364_TimedRotatingLogger
j-c-cook Dec 28, 2022
b8a7ec5
Update API order to be like develop and add formats set
j-c-cook Dec 28, 2022
ce815d6
Fix mypy workflow build error check
j-c-cook Dec 28, 2022
842dcbb
Include the previous changes made to _default_name
j-c-cook Dec 28, 2022
2a466b9
Fix spacing in _default_name
j-c-cook Dec 28, 2022
49649e7
Update logconvert to use the generalized RotatingLogger
j-c-cook Dec 28, 2022
35d25c7
Fix comment to reference RotatingLogger
j-c-cook Dec 28, 2022
b763f4a
Format code with black
j-c-cook Dec 28, 2022
29717f4
Add test for time rollover condition
j-c-cook Dec 28, 2022
ad382b5
Merge branch 'issue1364_TimedRotatingLogger' of https://github.com/j-…
j-c-cook Dec 28, 2022
8aff574
Add note to preserve size rotating test functions at v5.0
j-c-cook Dec 28, 2022
cabafb4
Merge branch 'develop' into issue1364_TimedRotatingLogger
j-c-cook Jan 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update API order to be like develop and add formats set
  • Loading branch information
j-c-cook committed Dec 28, 2022
commit b8a7ec52e33962227b619e6eb3f345bc3a80f9d4
5 changes: 3 additions & 2 deletions can/io/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,15 @@ class RotatingLogger(BaseRotatingLogger):
:meth:`~can.Listener.stop` is called.
"""

_supported_formats = {".asc", ".blf", ".csv", ".log", ".txt"}
last_rollover_time = time.time()

def __init__(
self,
base_filename: StringPathLike,
*args: Any,
max_bytes: int = 0,
max_seconds: int = 0,
*args: Any,
**kwargs: Any,
) -> None:
"""
Expand Down Expand Up @@ -483,4 +484,4 @@ def __init__(
DeprecationWarning,
)
# Initialize self as a RotatingLogger
super().__init__(base_filename, *args, max_bytes=max_bytes, **kwargs)
super().__init__(base_filename, max_bytes=max_bytes, *args, **kwargs)