mirror of
https://github.com/tiennm99/serena.git
synced 2026-10-13 10:16:00 +00:00
SerenaDashboardTrayManager: Add debug mode with file logging
This commit is contained in:
1 parent
dd734f8478
commit
ce10a7bdea
1 file changed
+9
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user