Skip to content

Commit 1cab767

Browse files
committed
docs update
1 parent 45a6736 commit 1cab767

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# json-logging
2-
Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as [ELK](https://www.elastic.co/elk-stack), [EFK](https://docs.fluentd.org/v0.12/articles/docker-logging-efk-compose)
2+
Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as [ELK](https://www.elastic.co/elk-stack), [EFK](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes)
33

44
If you're using Cloud Foundry, it worth to check out the library [SAP/cf-python-logging-support](https://github.com/SAP/cf-python-logging-support) which I'm also original author.
55
# Content
@@ -19,11 +19,12 @@ If you're using Cloud Foundry, it worth to check out the library [SAP/cf-python-
1919

2020
# 1. Features
2121
1. Emit JSON logs ([format detail](#0-full-logging-format-references))
22-
2. Auto extract **correlation-id** for distributed tracing [\[1\]](#1-what-is-correlation-idrequest-id)
23-
3. Lightweight, no dependencies, minimal configuration needed (1 LoC to get it working)
24-
4. Seamlessly integrate with Python native **logging** module. Support both Python 2.7.x and 3.x
22+
2. Lightweight, no dependencies, minimal configuration needed (1 LoC to get it working)
23+
3. Seamlessly integrate with Python native **logging** module. Support both Python 2.7.x and 3.x
24+
4. Auto extract **correlation-id** for distributed tracing [\[1\]](#1-what-is-correlation-idrequest-id)
2525
5. Support HTTP request instrumentation. Built in support for [Flask](https://github.com/pallets/flask/), [Sanic](https://github.com/channelcat/sanic), [Quart](https://gitlab.com/pgjones/quart), [Connexion](https://github.com/zalando/connexion). Extensible to support other web frameworks. PR welcome :smiley: .
2626
6. Highly customizable: support inject arbitrary extra properties to JSON log message, override logging formatter, etc.
27+
7. Production ready, this has been used in production for 3 years+
2728

2829
# 2. Usage
2930
Install by running this command:
@@ -34,8 +35,6 @@ By default log will be emitted in normal format to ease the local development. T
3435
To configure, call **json_logging.init_< framework_name >()**. Once configured library will try to configure all loggers (existing and newly created) to emit log in JSON format.
3536
See following use cases for more detail.
3637

37-
TODO: update guide on how to use ELK stack to view log
38-
3938
## 2.1 Non-web application log
4039
This mode don't support **correlation-id**.
4140
```python
@@ -360,7 +359,7 @@ password=
360359
build
361360
```bash
362361
python setup.py bdist_wheel --universal
363-
python setup.py sdist --universal
362+
python setup.py sdist
364363
```
365364

366365
pypitest
@@ -370,6 +369,7 @@ pip3 install json_logging --index-url https://test.pypi.org/simple/
370369
```
371370
pypi
372371
```
373-
pip3 install json_loggingtwine upload --repository-url https://upload.pypi.org/legacy/ dist/*
372+
pip3 install json_logging
373+
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
374374
375375
```

json_logging/framework/connexion/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def before_request():
5656
def after_request(response):
5757
request_info = g.request_info
5858
request_info.update_response_status(response)
59-
# TODO:handle to print out request instrumentation in non-JSON mode
6059
self.request_logger.info("", extra={'request_info': request_info})
6160
return response
6261

json_logging/framework/flask/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def before_request():
5151
def after_request(response):
5252
request_info = g.request_info
5353
request_info.update_response_status(response)
54-
# TODO:handle to print out request instrumentation in non-JSON mode
5554
self.request_logger.info("", extra={'request_info': request_info})
5655
return response
5756

0 commit comments

Comments
 (0)