Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #37 from opentracing/bhs/better_default_log_impl
Browse files Browse the repository at this point in the history
Add a better default log() impl
  • Loading branch information
bensigelman committed Sep 22, 2016
2 parents c26ce82 + 2614cef commit de0f48f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion opentracing/span.py
Expand Up @@ -217,4 +217,12 @@ def log_event(self, event, payload=None):

def log(self, **kwargs):
"""DEPRECATED"""
return self.log_kv(kwargs)
key_values = {}
if kwargs['event'] is not None:
key_values['event'] = kwargs['event']
if kwargs['payload'] is not None:
key_values['payload'] = kwargs['payload']
timestamp = None
if kwargs['timestamp'] is not None:
timestamp = kwargs['timestamp']
return self.log_kv(key_values, timestamp)

0 comments on commit de0f48f

Please sign in to comment.