mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 15:16:41 +00:00
Bridge Foolscap logs to Twisted's so they appear in test.log
This commit is contained in:
parent
2a6870d772
commit
edb380f801
@ -55,9 +55,22 @@ def disable_foolscap_incidents():
|
|||||||
iq = NonQualifier()
|
iq = NonQualifier()
|
||||||
theLogger.setIncidentQualifier(iq)
|
theLogger.setIncidentQualifier(iq)
|
||||||
|
|
||||||
# we disable incident reporting for all unit tests.
|
def bridge_foolscap_logs_to_twisted():
|
||||||
disable_foolscap_incidents()
|
# Dump all of the Foolscap logs into the Twisted logging system where they
|
||||||
|
# can get scooped up by any other log observers we configure.
|
||||||
|
from foolscap.logging import log
|
||||||
|
log.bridgeLogsToTwisted()
|
||||||
|
|
||||||
|
def configure_foolscap_logging():
|
||||||
|
# we disable incident reporting for all unit tests.
|
||||||
|
disable_foolscap_incidents()
|
||||||
|
|
||||||
|
# we want to collect Foolscap logs too, and it's easiest to do this by
|
||||||
|
# getting them into one of the log systems we already have collection set
|
||||||
|
# up for.
|
||||||
|
bridge_foolscap_logs_to_twisted()
|
||||||
|
|
||||||
|
configure_foolscap_logging()
|
||||||
|
|
||||||
def _configure_hypothesis():
|
def _configure_hypothesis():
|
||||||
from os import environ
|
from os import environ
|
||||||
|
Loading…
Reference in New Issue
Block a user