Vinay Sajip <[email protected]> added the comment:
You would just clear all handlers added to the root logger before calling the
existing code:
try:
# new code to be added, not tested
for h in root.handlers[:]:
root.removeHandler(h)
h.close()
# existing code
if len(root.handlers) == 0:
handlers = kwargs.pop("handlers", None)
Of course, test case, documentation etc. needs to be added as well.
Not sure if "restart" is the best name, as it implies more than we're doing
here. Similarly for "reset". IMO "force" might be better as the keyword
argument name. Raymond, what do you think about "force" from a pedagogical
point of view?
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33897>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com