aboutsummaryrefslogtreecommitdiff
path: root/audiobook.py
diff options
context:
space:
mode:
authorhistoria <historiavg@proton.me>2026-08-28 03:16:14 -0400
committerhistoria <historiavg@proton.me>2026-08-28 03:16:14 -0400
commitd487996281f71ccd3034dd708fa099057e528b42 (patch)
tree989d9f40f5c2dbb03e1cf570f2c463f43cf5ac76 /audiobook.py
parent5c3db8f500ff206f3a675d8f4184cb0d61f94804 (diff)
downloadtts-audiobook-generator-d487996281f71ccd3034dd708fa099057e528b42.tar.gz
feat: unified logging with logging_kit.py
Diffstat (limited to 'audiobook.py')
-rwxr-xr-xaudiobook.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/audiobook.py b/audiobook.py
index 7bdd989..0d0f5d7 100755
--- a/audiobook.py
+++ b/audiobook.py
@@ -36,6 +36,9 @@ sys.path.insert(0, str(APP_DIR))
# runs only when audiobook.py is executed as a script, from main() below.
from backends import envs as _envs # noqa: I001
+# app/logs owner: naming conventions and startup pruning (stdlib-only).
+import logging_kit # noqa: I001
+
from converter import config
from converter import converter as _converter_mod
from converter.clients import (
@@ -198,6 +201,9 @@ def main() -> None:
# requirements.txt) first if needed. A no-op when already there. Done
# here rather than at import time so importing this module is light.
_envs.bootstrap(__file__)
+ # Trim stale stream/artifact logs once per app start (server logs are
+ # never touched); see app/logging_kit.py.
+ logging_kit.prune_logs()
# No arguments + interactive terminal -> the TUI hub (set up backends
# and process the input directory end-to-end). Anything else is the
# scriptable argparse CLI.