Used patch_logger in logging tests.