|
15 | 15 |
|
16 | 16 | import pytest |
17 | 17 | from aioca import purge_channel_caches |
| 18 | +from loguru import logger as _logger |
18 | 19 | from softioc import builder |
19 | 20 |
|
20 | 21 | from fastcs.attributes import AttrR, AttrRW, AttrW |
21 | 22 | from fastcs.datatypes import Bool, Float, Int, String |
22 | 23 | from fastcs.launch import build_controller_api |
| 24 | +from fastcs.logging import LogLevel, configure_logging |
23 | 25 | from fastcs.transport.tango.dsr import register_dev |
24 | 26 | from tests.assertable_controller import MyTestAttributeIORef, MyTestController |
25 | 27 | from tests.example_p4p_ioc import run as _run_p4p_ioc |
@@ -86,6 +88,11 @@ def _run_ioc_as_subprocess( |
86 | 88 | error_queue: multiprocessing.Queue, |
87 | 89 | stdout_queue: multiprocessing.Queue, |
88 | 90 | ): |
| 91 | + configure_logging(LogLevel.INFO) |
| 92 | + # we need to capture log messages from transport |
| 93 | + logger = _logger.bind(logger_name="fastcs.transport.epics.ca.transport") |
| 94 | + logger.add(print) # forward log messages to stdout |
| 95 | + |
89 | 96 | try: |
90 | 97 | from pytest_cov.embed import cleanup_on_sigterm |
91 | 98 | except ImportError: |
@@ -127,7 +134,7 @@ def run_ioc_as_subprocess( |
127 | 134 | start_time = time.monotonic() |
128 | 135 | while True: |
129 | 136 | try: |
130 | | - if "Running FastCS IOC" in ( |
| 137 | + if "Running IOC" in ( |
131 | 138 | stdout_queue.get(timeout=ioc_startup_timeout) # type: ignore |
132 | 139 | ): |
133 | 140 | stdout_queue.get() # get the newline |
|
0 commit comments