SerenaDashboardTrayManager: Add debug mode with file logging

This commit is contained in:
Dominik Jain authored and Dominik Jain committed 2026-04-18 01:47:33 +02:00
1 parent dd734f8478
commit ce10a7bdea
1 file changed
+9 -1
+9 -1
View File
@@ -861,7 +861,7 @@ class SerenaDashboardViewer(WebViewWithTray):
def run(self) -> None:
if self.DEBUG:
logging.configure(level=logging.DEBUG)
logging.configure(level=logging.DEBUG, stream=sys.stderr)
logging.add_file_logger(SerenaPaths().get_next_log_file_path("dashboard-viewer"))
super().run()
@@ -896,6 +896,8 @@ class SerenaDashboardTrayManager:
needs it and terminates automatically when no dashboard instances remain.
"""
DEBUG = False
PORT = SerenaPorts.TRAY_MANAGER_PORT
HOST = "127.0.0.1"
@@ -1075,6 +1077,12 @@ class SerenaDashboardTrayManager:
"""Run the tray manager (blocking). Starts Flask, alive-check thread, and tray icon."""
import pystray
if self.DEBUG:
logging.configure(level=logging.DEBUG, stream=sys.stderr)
logging.add_file_logger(SerenaPaths().get_next_log_file_path("tray-manager"))
log.info("Starting tray manager")
dashboard_path = Path(SERENA_DASHBOARD_DIR)
# select the appropriate icon for the platform