From 4de92da1ae75f0232c3d901d3d57c47f8846ebfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Garc=C3=ADa=20Amor?= Date: Mon, 3 Nov 2025 14:13:19 +0100 Subject: [PATCH] Set dbcleanup.log location configurable --- sample.config.ini | 2 ++ startdb.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sample.config.ini b/sample.config.ini index 1931931..0e64980 100644 --- a/sample.config.ini +++ b/sample.config.ini @@ -109,3 +109,5 @@ vacuum = False # Application logs (errors, startup messages, etc.) are unaffected # Set to True to enable, False to disable (default: False) access_log = False +# Database cleanup logfile +db_cleanup_logfile = dbcleanup.log diff --git a/startdb.py b/startdb.py index 01e3e63..f48a1b1 100644 --- a/startdb.py +++ b/startdb.py @@ -13,7 +13,7 @@ from meshview.config import CONFIG # ------------------------- cleanup_logger = logging.getLogger("dbcleanup") cleanup_logger.setLevel(logging.INFO) -file_handler = logging.FileHandler("dbcleanup.log") +file_handler = logging.FileHandler(CONFIG["logging"]["db_cleanup_logfile"]) file_handler.setLevel(logging.INFO) formatter = logging.Formatter('%(asctime)s [%(levelname)s] %(message)s') file_handler.setFormatter(formatter)