_gzip_file now writes to a .tmp sibling and atomically os.replaces it onto the final .gz path, so a crash/OOM mid-write can never leave a truncated .gz where retention trusts it; retier's plain/gz dedupe additionally verifies a .gz decompresses cleanly before removing its plain twin, so a corrupt .gz is never preferred over the last intact copy. rotate="size" now always forces the handler's backupCount to fire regardless of backup_count, so backup_count=0 means "keep zero rolled files" (each roll deletes itself immediately) instead of silently disabling rotation and growing the live file unbounded. Also mirrors retier's mtime+roll-counter sort key into prune() so a same-second burst with tied mtimes prunes the oldest files instead of arbitrary listdir order (logsetup-9, adjacent one-line fix). Bumps to v0.5.1. Signed-off-by: disqualifier <dev@disqualifier.me>
14 lines
343 B
TOML
14 lines
343 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "log_setup"
|
|
version = "0.5.1"
|
|
description = "stdlib app-entry-point logging setup: live run.log, rotation, gzip, retention, consistent format"
|
|
requires-python = ">=3.10"
|
|
dependencies = []
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/log_setup"]
|