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.
Description
This adds support for PSR-3, which enables standardized logging. It also allows enabling a "debug" flag that will log out a Request and associated Response if a logger is set at DEBUG level.
This does not provide a logger itself, just allows a PSR-3 compatible logger to be passed in via the MapFactory and setting something to the
PSR\Log\LoggerInterface
key. The user is responsible for providing the logger that the client will use.This also allows us to add logging capabilities to the individual APIs as well later down the line.
Motivation and Context
Logging is a standard thing most applications do. Users can now get basic logging from our system. Request/Response logging is available as it is the most common debugging information that is needed.
How Has This Been Tested?
Test scripts using Monolog as a logging solution.
Example Output or Screenshots (if appropriate):
To enable logging, you will need to enable the new
debug
flag as well as pass a PSR-3 compliant logger such as Monolog (not shipped with our library):Types of changes
Checklist: