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)