Some similar JSON logging projects for your reference.
https://github.com/trentm/node-bunyan
{ "name": "myserver", "hostname": "banana.local", "pid": 123, "req": { "method": "GET", "url": "/path?q=1#anchor", "headers": { "x-hi": "Mom", "connection": "close" }, "remoteAddress": "120.0.0.1", "remotePort": 51244 }, "level": 3, "msg": "start request", "time": "2012-02-03T19:02:57.534Z", "v": 0 }
https://github.com/madzak/python-json-logger
{ "threadName": "MainThread", "name": "root", "thread": 140735202359648, "created": 1336281068.506248, "process": 41937, "processName": "MainProcess", "relativeCreated": 9.100914001464844, "module": "tests", "funcName": "testFormatKeys", "levelno": 20, "msecs": 506.24799728393555, "pathname": "tests/tests.py", "lineno": 60, "asctime": ["12-05-05 22:11:08,506248"], "message": "testing logging format", "filename": "tests.py", "levelname": "INFO", "special": "value", "run": 12 }