Skip to content

Commit

Permalink
Return cid instead of cid object
Browse files Browse the repository at this point in the history
  • Loading branch information
nir0s committed Feb 28, 2018
1 parent 079ae97 commit 967c300
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Specifically for non-distributed systems, you can use the `cid` generated by the
```python
# cid defaults to a uuid if it isn't provided.
cid = wryter.event('User logging in', {'user_id': 'nir0s'}, cid=user_id)
wryter.bind(cid)
wryter.bind(cid=cid)
wryter.debug('Requesting log-in host...', ...)
...
wryter.debug('Querying db for available server...', ...)
Expand Down
2 changes: 1 addition & 1 deletion wryte.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def event(self, message, *objects, **kwargs):
objects = objects + ({'type': 'event', 'cid': cid},)
obj = self._enrich(message, 'info', objects, kwargs)
self.logger.info(obj)
return {'cid': cid}
return cid

def log(self, level, message, *objects, **kwargs):
obj = self._enrich(message, level, objects, kwargs)
Expand Down

0 comments on commit 967c300

Please sign in to comment.