Refactor test_logging to use unittest. This should finally solve the flakiness
issues.

Thanks to Antoine Pitrou for the patch.
diff --git a/Misc/NEWS b/Misc/NEWS
index 3cd73fb..208c350 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1419,7 +1419,7 @@
 Tests
 -----
 
-- Refactor test_logging to use doctest.
+- Refactor test_logging to use unittest.
 
 - Refactor test_profile and test_cprofile to use the same code to profile.