Definition at line 86 of file logcapture.py.
Public Member Functions | |
| __init__ (self, CapturedLogs logs) | |
| list[dict] | select (self, **query) |
| Select logs matching query. | |
| subscribe (self, **query) | |
| Subscribe to records matching query. | |
Protected Attributes | |
| _logs = logs | |
| testsuite.logcapture.Capture.__init__ | ( | self, | |
| CapturedLogs | logs ) |
Definition at line 87 of file logcapture.py.
| list[dict] testsuite.logcapture.Capture.select | ( | self, | |
| ** | query ) |
Select logs matching query.
Could only be used after capture contextmanager block.
.. code-block:: python
async with logcapture_server.capture() as capture: ... records = capture.select(text='Message to capture')
Definition at line 90 of file logcapture.py.
| testsuite.logcapture.Capture.subscribe | ( | self, | |
| ** | query ) |
Subscribe to records matching query.
Returns decorator function. subscribe() may only be used within capture() block. Callqueue is returned.
.. code-block:: python
async with logcapture_server.capture() as capture: @capture.subscribe(text='Message to capture') def log_event(link, **other): ... ... assert log_event.wait_call()
Definition at line 119 of file logcapture.py.
|
protected |
Definition at line 88 of file logcapture.py.