Skip to content

Commit 485b5f2

Browse files
committed
WIP
1 parent ad59e0c commit 485b5f2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dvr_scan/shared/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ def logfile_path(logfile_name: str):
7272

7373
def setup_logger(logfile_path: str, max_size_bytes: int, max_files: int):
7474
"""Initialize rolling debug logger."""
75+
# TODO(#227): Multiple processes will try to write to the same log file causing issues.
76+
# To fix this, we should consider using the PID of the current process to create a unique
77+
# log file. When the program exits, we can create a lockfile and then merge the logs back
78+
# into a contiguous file. This does mean we'll have to handle log rotation and sizing
79+
# rather than using the Python logger framework however.
7580
folder = user_log_path("DVR-Scan", False)
7681
folder.mkdir(parents=True, exist_ok=True)
7782
handler = RotatingFileHandler(

0 commit comments

Comments
 (0)