mirror of
https://github.com/pablorevilla-meshtastic/meshview.git
synced 2026-03-04 23:27:46 +01:00
Set dbcleanup.log location configurable
This commit is contained in:
committed by
Joel Krauska
parent
74369deaea
commit
4de92da1ae
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user