Add a context manager for capturing logs emitted via the twisted.logger API.
The idea comes from Adi via #8036.
I've simplified the class a wee bit, and make asText() a method that generates the text on demand, since I think that poking at the actual events is probably enough for most test cases.
Searchable metadata
trac-id__9617 9617
type__enhancement enhancement
reporter__wsanchez wsanchez
priority__normal normal
milestone__None None
branch__log_capture2 log-capture2
branch_author__
status__closed closed
resolution__fixed fixed
component__logger logger
keywords__None None
time__1554750809700727 1554750809700727
changetime__1555092238361101 1555092238361101
version__None None
owner__None None
cc__adiroiban
Add a context manager for capturing logs emitted via the
twisted.loggerAPI.The idea comes from Adi via #8036.
I've simplified the class a wee bit, and make asText() a method that generates the text on demand, since I think that poking at the actual events is probably enough for most test cases.
Searchable metadata