Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F12945060
D8243.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8243.diff
View Options
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -284,7 +284,18 @@
self.log.error("Hint: Call {} '{}' to consolidate all logs".format(os.path.normpath(
os.path.dirname(os.path.realpath(__file__)) + "/../combine_logs.py"), self.options.tmpdir))
exit_code = TEST_EXIT_FAILED
- logging.shutdown()
+ # Logging.shutdown will not remove stream- and filehandlers, so we must
+ # do it explicitly. Handlers are removed so the next test run can apply
+ # different log handler settings.
+ # See: https://docs.python.org/3/library/logging.html#logging.shutdown
+ for h in list(self.log.handlers):
+ h.flush()
+ h.close()
+ self.log.removeHandler(h)
+ rpc_logger = logging.getLogger("BitcoinRPC")
+ for h in list(rpc_logger.handlers):
+ h.flush()
+ rpc_logger.removeHandler(h)
if cleanup_tree_on_exit:
shutil.rmtree(self.options.tmpdir)
return exit_code
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 17:39 (21 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5082790
Default Alt Text
D8243.diff (1 KB)
Attached To
D8243: Add closing and flushing of logging handlers
Event Timeline
Log In to Comment