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:
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user