Opened 13 years ago
Closed 13 years ago
#194 closed defect (fixed)
using tub.setOption("bridge-twisted-logs") multiple times causes duplicate messages
Reported by: | Brian Warner | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 0.6.4 |
Component: | logging | Version: | 0.6.1 |
Keywords: | Cc: |
Description
The tahoe unit tests exercise node-creation a lot (35 times in test_system
), and node-creation calls tub.setOption("bridge-twisted-logs", True)
, which calls foolscap.logging.log.bridgeLogsFromTwisted()
, which does twisted.python.log.addObserver
each time. By the end of the run, there are 35 duplicate observers, and every twisted log message gets duplicated 35 times.
I don't think this is breaking anything, but it's certainly annoying.
Attachments (1)
Change History (3)
Changed 13 years ago by
Attachment: | no-duplog.diff added |
---|
comment:1 Changed 13 years ago by
That patch fails a few tests in test_logging
, because the tests expect to be able to replace the observer. A better patch might be to keep track of the observer that was added, and remove it again when bridgeLogsFromTwisted
is called a second time.
comment:2 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in a better way in [faaa73b].
incomplete patch (tests fail)