12
12
13
13
Pypi:
14
14
15
- https://pypi.python.org/pypi/python-json-logger
15
+ https://pypi.python.org/pypi/python-json-logger
16
16
17
17
Manual:
18
18
@@ -67,27 +67,27 @@ To use the module with a config file using the [`fileConfig` function](https://d
67
67
68
68
[loggers]
69
69
keys = root,custom
70
-
70
+
71
71
[logger_root]
72
- handlers =
73
-
72
+ handlers =
73
+
74
74
[logger_custom]
75
75
level = INFO
76
76
handlers = custom
77
77
qualname = custom
78
-
78
+
79
79
[handlers]
80
80
keys = custom
81
-
81
+
82
82
[handler_custom]
83
83
class = StreamHandler
84
84
level = INFO
85
85
formatter = json
86
86
args = (sys.stdout,)
87
-
87
+
88
88
[formatters]
89
89
keys = json
90
-
90
+
91
91
[formatter_json]
92
92
format = %(message)s
93
93
class = pythonjsonlogger.jsonlogger.JsonFormatter
@@ -99,22 +99,22 @@ Sample JSON with a full formatter (basically the log message from the unit test)
99
99
100
100
``` json
101
101
{
102
- "threadName" : " MainThread" ,
103
- "name" : " root" ,
104
- "thread" : 140735202359648 ,
105
- "created" : 1336281068.506248 ,
106
- "process" : 41937 ,
107
- "processName" : " MainProcess" ,
108
- "relativeCreated" : 9.100914001464844 ,
109
- "module" : " tests" ,
110
- "funcName" : " testFormatKeys" ,
111
- "levelno" : 20 ,
112
- "msecs" : 506.24799728393555 ,
113
- "pathname" : " tests/tests.py" ,
114
- "lineno" : 60 ,
115
- "asctime" : [" 12-05-05 22:11:08,506248" ],
116
- "message" : " testing logging format" ,
117
- "filename" : " tests.py" ,
102
+ "threadName" : " MainThread" ,
103
+ "name" : " root" ,
104
+ "thread" : 140735202359648 ,
105
+ "created" : 1336281068.506248 ,
106
+ "process" : 41937 ,
107
+ "processName" : " MainProcess" ,
108
+ "relativeCreated" : 9.100914001464844 ,
109
+ "module" : " tests" ,
110
+ "funcName" : " testFormatKeys" ,
111
+ "levelno" : 20 ,
112
+ "msecs" : 506.24799728393555 ,
113
+ "pathname" : " tests/tests.py" ,
114
+ "lineno" : 60 ,
115
+ "asctime" : [" 12-05-05 22:11:08,506248" ],
116
+ "message" : " testing logging format" ,
117
+ "filename" : " tests.py" ,
118
118
"levelname" : " INFO" ,
119
119
"special" : " value" ,
120
120
"run" : 12
0 commit comments