Code import
This commit is contained in:
19
venv/lib/python2.7/site-packages/eventlet/zipkin/log.py
Normal file
19
venv/lib/python2.7/site-packages/eventlet/zipkin/log.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import logging
|
||||
|
||||
from eventlet.zipkin import api
|
||||
|
||||
|
||||
__original_handle__ = logging.Logger.handle
|
||||
|
||||
|
||||
def _patched_handle(self, record):
|
||||
__original_handle__(self, record)
|
||||
api.put_annotation(record.getMessage())
|
||||
|
||||
|
||||
def patch():
|
||||
logging.Logger.handle = _patched_handle
|
||||
|
||||
|
||||
def unpatch():
|
||||
logging.Logger.handle = __original_handle__
|
||||
Reference in New Issue
Block a user