Added support for Request ID generators #670
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When processing HTTP requests, it's a good practice to specify a unique request ID value for each log entry. This way, multiple log entries could be grouped together according to the specified request ID, which dramatically helps in debugging/analysing
requests processing.
This PR allows to specify custom request ID generation function for logger instances. Which opens a path for easy
cls-rtracer
integration. Please see the updated README for more details and examples.This should be considered a non-breaking minor release.
req_id
property that can be passed to the logger constructorSo I'm not sure regarding the maintenance status of this project, I've created and published a forked version of the library, so it could be used straight away if someone would want to.