1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 01:03:24 +00:00

Add Logging

This helps to figure out which matcher has decided your two cassettes
differ, and figure out when your cassettes have hit the network.

Closes #34
This commit is contained in:
Kevin McCarthy
2014-04-27 11:29:06 -10:00
parent 4302d7753e
commit f317800cb7
4 changed files with 73 additions and 3 deletions

View File

@@ -1,5 +1,17 @@
import logging
from .config import VCR
# Set default logging handler to avoid "No handler found" warnings.
import logging
try: # Python 2.7+
from logging import NullHandler
except ImportError:
class NullHandler(logging.Handler):
def emit(self, record):
pass
logging.getLogger(__name__).addHandler(NullHandler())
default_vcr = VCR()