feat: add incremental log scanning with resumable byte offsets

Track last processed byte offset per log file so scans only read new
entries, add --full flag to force a rescan, and persist state atomically.
This commit is contained in:
zwitschi committed 2026-08-05 21:41:00 +02:00
1 parent f5abaaf7e5
commit 51f57f7a04
14 files changed
+133 -9

No files matched your search

+3
View File
@@ -164,6 +164,8 @@ def main() -> None:
COPYPARTY_LOG_PATH, COPYPARTY_REPORT_DIR)
parser.add_argument("--min-denied", type=int, default=DEFAULT_MIN_DENIED,
help=f"minimum denied hits before flagging (default: {DEFAULT_MIN_DENIED})")
parser.add_argument("--full", action="store_true",
help="rescan all logs from the start (ignore incremental state)")
args = parser.parse_args()
CopypartyAnalyzer(
@@ -171,6 +173,7 @@ def main() -> None:
report_dir=args.report_dir,
top=args.top,
quiet=args.quiet,
full=args.full,
min_denied=args.min_denied,
).run()