We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d027e3 commit ff93923Copy full SHA for ff93923
README.md
@@ -151,6 +151,16 @@ if __name__ == "__main__":
151
app.run()
152
```
153
154
+### Custom handler for request instrumentation
155
+you need to explicitly set JSONRequestLogFormatter as default formatter for request_logger
156
+
157
+```python
158
+request_logger = json_logging.get_request_logger()
159
+handler = logging.handlers.RotatingFileHandler(filename='log_req.log', maxBytes=5000000, backupCount=10)
160
+handler.setFormatter(json_logging.JSONRequestLogFormatter())
161
+request_logger.addHandler(handler)
162
+```
163
164
## 2.3 Get current correlation-id
165
Current request correlation-id can be retrieved and pass to downstream services call as follow:
166
0 commit comments