Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kivio committed Jun 20, 2016
1 parent c4e861b commit b04ad4c
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion README.md
Expand Up @@ -5,12 +5,20 @@
Pysllo
======

Make your python logging more structured and easy to aggregate
Make your python logging more structured and easy to aggregate using all features of pysllo.
Pysllo is set of useful python logging extenders that make possible saving logs into StackLight
with possibility of flow tracking, data binding and raising all logs if error occurs.


For more information go to documentation on [ReadTheDocs](https://readthedocs.org/projects/pysllo).

Quick start
-----------

```bash
pip install pysllo
```

Features
--------

Expand All @@ -22,3 +30,27 @@ Features

Example
-------

```python
from pysllo.handlers import ElasticSearchUDPHandler
from pysllo.formatters import JsonFormatter
from pysllo.utils import LoggersFactory

# configuration
host, port, limit = 'localhost', 9000
handler = ElasticSearchUDPHandler([(host, port)])
formatter = JsonFormatter()
handler.setFormatter(formatter)
MixedLogger = LoggersFactory.make(
tracking_logger=True,
propagation_logger=True,
structured_logger=True
)
logger = MixedLogger('test')
logger.addHandler(handler)

# examlpe usage
msg = "TEST"
logger.bind(ip='127.0.0.1')
logger.debug(msg, user=request.user)
```

0 comments on commit b04ad4c

Please sign in to comment.