From d83fedc7cd21e2758be7fbe05b7abf2432f3ee9d Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 23 Oct 2025 14:21:03 +0200 Subject: [PATCH] TELL: added custom logger to tell_client.py --- daq/src/mxlibs3/tell_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/daq/src/mxlibs3/tell_client.py b/daq/src/mxlibs3/tell_client.py index 6bb29701..bbd4bcda 100755 --- a/daq/src/mxlibs3/tell_client.py +++ b/daq/src/mxlibs3/tell_client.py @@ -7,6 +7,8 @@ from typing import List from urllib.parse import urlparse import requests + +from aaredaqlib.logger_config import setup_logger from aaredaqlib.models import ( PuckLoadedInfo, SampleShortInfo, @@ -20,7 +22,7 @@ from aareDBclient import ( from aaredaqlib.beamline import MXBeamline # noqa: F401 from mxlibs3.pshell_client import PShellClient -logger = logging.getLogger(__name__) +logger = setup_logger(__name__, "/tmp/mxlogs") class TellMountFailedException(Exception): @@ -319,12 +321,12 @@ class TellClient: ) wait_timeout = timeout + self.estimate_mounting_time(segment) - print(f"{time.ctime()} waiting for mount to complete") + logger.info("waiting for mount to complete") if wait: self.check_command_ok( timeout=wait_timeout, msg=f"Mount failed for {segment}{puck}-{sample}: " ) - print(f"{time.ctime()} post waiting") + logger.info("post waiting") return self._last_cmd_id def unmount(self, force=False, wait=False, timeout=360.0):