You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Support **correlation-id**[\[1\]](#1-what-is-correlation-idrequest-id)
22
+
3. Lightweight, no dependencies. Minimal configuration needed (1 LoC to get it working)
23
+
4. Fully compatible with Python **logging** module. Support both Python 2.7.x and 3.x
24
+
5. Support HTTP request instrumentation. Built in support for [Flask](http://flask.pocoo.org/) & [Sanic](http://flask.pocoo.org/). Extensible to support other web frameworks. PR welcome :smiley: .
25
+
6. Support inject arbitrary extra properties to JSON log message.
27
26
28
27
# 2. Usage
29
28
Install by running this command:
30
29
> pip install json-logging
31
30
32
-
By default log will be emitted in normal format to ease the local development. To enable it on production set either json_logging.ENABLE_JSON_LOGGING or ENABLE_JSON_LOGGING environment variable to true.
31
+
By default log will be emitted in normal format to ease the local development. To enable it on production set either **json_logging.ENABLE_JSON_LOGGING** or **ENABLE_JSON_LOGGING environment variable** to true.
33
32
34
-
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. See each use case for more detail.
33
+
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.
34
+
See following use cases for more detail.
35
35
36
36
TODO: update guide on how to use ELK stack to view log
0 commit comments