Skip to content

Commit

Permalink
Update docs that kv string support was remove
Browse files Browse the repository at this point in the history
  • Loading branch information
nir0s committed Mar 13, 2018
1 parent ac99f6c commit c93122d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ wryter.info('My Message', {'key1': 'value2', 'key2': 'value2'}, 'who=where')

wryter.error('Logging kwargs', key='value') # kwargs
wryter.debug('Logging JSON strings', '{"key": "value"}') # JSON strings
wryter.info('Logging kv strings', 'key=value') # kv strings
wryter.critical('Logging nested dicts', {'key': 'value', 'nested': { 'key1': 'value1', 'key2': 'value2'}})

```
Expand Down Expand Up @@ -258,7 +257,7 @@ Until unbound, the logger will include the bound fields in each message.
```python
wryter = ...
wryter.info('This will add the above key value pairs to any log message')
wryter.bind({'user_id': framework.user, ...}, 'key=value')
wryter.bind({'user_id': framework.user, ...}, key=value)
# ...do stuff

wryter.unbind('user_id')
Expand Down Expand Up @@ -342,7 +341,7 @@ import logging
wryter = Wryte(name='wryte', level='debug', bare=True)
wryter.add_handler(handler=logging.FileHandler('file.log'), formatter='console')

wryter.info('My Message', {'key1': 'value2', 'key2': 'value2'}, 'who=where')
wryter.info('My Message', {'key1': 'value2', 'key2': 'value2'}, who=where)

with open('file.log') as log_file:
print(log_file.read())
Expand All @@ -362,7 +361,7 @@ handler_name = wryter.add_handler(
handler=logging.FileHandler('file.log'),
formatter='console')

wryter.info('My Message', {'key1': 'value2', 'key2': 'value2'}, 'who=where')
wryter.info('My Message', {'key1': 'value2', 'key2': 'value2'}, who=where)
# ...log some more

wryter.list_handlers()
Expand Down Expand Up @@ -426,7 +425,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)
cid = wryter.event('User logging in', {'user_id': 'nir0s'}, cid=user.id)
wryter.bind(cid=cid)
wryter.debug('Requesting log-in host...', ...)
...
Expand Down

0 comments on commit c93122d

Please sign in to comment.