GUI: logging added to gui.py
This commit is contained in:
@@ -3,11 +3,14 @@ import sys
|
||||
from PySide6.QtCore import QCommandLineParser, QCommandLineOption
|
||||
from PySide6.QtWidgets import QApplication, QDialog
|
||||
|
||||
from aaredaqlib.logger_config import setup_logger
|
||||
from aaregui.main_window import MainWindow
|
||||
from aaregui.widgets.login import LoginDialog
|
||||
from aaredaqlib.beamline import MXBeamline, mx_beamline
|
||||
from aaregui.auth import auth
|
||||
|
||||
logger = setup_logger(__name__, "/tmp/mxlogs")
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
@@ -86,7 +89,7 @@ if __name__ == "__main__":
|
||||
try:
|
||||
token = auth(base_url)
|
||||
except Exception as e:
|
||||
print(f"Cannot connect to AareDAQ server. Exiting. {e}")
|
||||
logger.error(f"Cannot connect to AareDAQ server. Exiting. {e}")
|
||||
sys.exit()
|
||||
|
||||
win = MainWindow(base_url=base_url,
|
||||
|
||||
Reference in New Issue
Block a user