Skip to content

Commit 22c86e3

Browse files
committed
Use rst for the README
1 parent ecd08cf commit 22c86e3

File tree

2 files changed

+35
-12
lines changed

2 files changed

+35
-12
lines changed

Diff for: README.md renamed to README.rst

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,33 @@
1-
JSON logging for Python [![PyPi version](https://img.shields.io/pypi/v/json-logging-py.svg)](https://pypi.python.org/pypi/json-logging-py/)
2-
============
1+
JSON logging for Python |PyPi version|
2+
======================================
33

4-
This library provides Python logging formatters to output JSON, 2 formatters are specific for Logstash message format version 0 or 1.
4+
This library provides Python logging formatters to output JSON, 2
5+
formatters are specific for Logstash message format version 0 or 1.
56

67
Installation
78
============
89

910
Using pip:
1011

12+
::
13+
1114
pip install json-logging-py
1215

1316
From source:
1417

18+
::
19+
1520
python setup.py install
1621

1722
Usage
1823
=====
1924

20-
The name of the library is `jsonlogging`, it provides 3 formatters:
25+
The name of the library is ``jsonlogging``, it provides 3 formatters:
26+
27+
JSONFormatter
28+
-------------
2129

22-
### JSONFormatter
30+
::
2331

2432
{
2533
"tags": [
@@ -34,7 +42,10 @@ The name of the library is `jsonlogging`, it provides 3 formatters:
3442
"logger": "root"
3543
}
3644

37-
### LogstashFormatterV0
45+
LogstashFormatterV0
46+
-------------------
47+
48+
::
3849

3950
{
4051
"@source": "JSON://server-01.example.com/example.py",
@@ -53,7 +64,10 @@ The name of the library is `jsonlogging`, it provides 3 formatters:
5364
"@type": "JSON"
5465
}
5566

56-
### LogstashFormatterV1
67+
LogstashFormatterV1
68+
-------------------
69+
70+
::
5771

5872
{
5973
"host": "server-01.example.com",
@@ -70,7 +84,10 @@ The name of the library is `jsonlogging`, it provides 3 formatters:
7084
"levelname": "ERROR"
7185
}
7286

73-
### Python example
87+
Python example
88+
--------------
89+
90+
::
7491

7592
import logging
7693
import jsonlogging
@@ -91,3 +108,6 @@ The name of the library is `jsonlogging`, it provides 3 formatters:
91108

92109
# You can pass additional tags
93110
logger.error('hello world!', extra={"tags": ["hello=world"]})
111+
112+
.. |PyPi version| image:: https://img.shields.io/pypi/v/json-logging-py.svg
113+
:target: https://pypi.python.org/pypi/json-logging-py/

Diff for: setup.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from setuptools import setup
22

3+
4+
with open('README.rst', 'r') as f:
5+
readme = f.read()
6+
37
setup(
48
name='json-logging-py',
5-
version='0.1',
6-
description='',
9+
version='0.2',
10+
description='JSON / Logstash formatters for Python logging',
11+
long_description=readme,
712
keywords=['json', 'logging', 'logstash'],
813
author='Sebastien Estienne',
914
author_email='[email protected]',
@@ -21,6 +26,4 @@
2126
'Operating System :: OS Independent',
2227
],
2328
py_modules=['jsonlogging'],
24-
setup_requires=['setuptools-markdown'],
25-
long_description_markdown_filename='README.md',
2629
)

0 commit comments

Comments
 (0)