diff --git a/foolscap/logging/log.py b/foolscap/logging/log.py
index 5e9f5a2..7373117 100644
a
|
b
|
class TwistedLogBridge: |
371 | 371 | event['from-twisted'] = True |
372 | 372 | self.logger.msg(**event) |
373 | 373 | |
| 374 | _bridgeLogsFromTwisted_active = False |
374 | 375 | def bridgeLogsFromTwisted(tubID=None, |
375 | 376 | twisted_logger=twisted_log.theLogPublisher, |
376 | 377 | foolscap_logger=theLogger): |
… |
… |
def bridgeLogsFromTwisted(tubID=None, |
381 | 382 | mostly for unit tests that don't want to modify the default instances. |
382 | 383 | For their benefit, I return the bridge. |
383 | 384 | """ |
| 385 | global _bridgeLogsFromTwisted_active |
| 386 | if _bridgeLogsFromTwisted_active: |
| 387 | return |
| 388 | _bridgeLogsFromTwisted_active = True |
384 | 389 | tlb = TwistedLogBridge(tubID, foolscap_logger) |
385 | 390 | twisted_logger.addObserver(tlb.observer) |
386 | 391 | return tlb |