New logging API + debug logger management as a higher-order React component. - #8
Open
alanchwong wants to merge 2 commits into
Open
New logging API + debug logger management as a higher-order React component.#8alanchwong wants to merge 2 commits into
alanchwong wants to merge 2 commits into
Conversation
Debug logging is now initialized by the WithDebugLogging component wrapping the Aqueductulous component. This places the responsibility of parsing the query string parameters inside the WithDebugLogging module rather than Aqueductulous. The default export of Aqueductulous.js is now the Aqueductulous component wrapped by WithDebugLogging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduces a WithDebugLogging higher-order component that wraps the Aqueductulous component to own the responsibility of parsing query string parameters and initializing logging.
The logging API has been changed to accept an object with (so far) three possible properties: title, message, and valuesMap. These three properties imply a semantic meaning to different pieces of logging data: a descriptive title to the event being logged, a static string logging message, and a set of key-value pairs to log. Any combination of these can be present in the object and the logging function will output to console appropriately. This makes the logging API more flexible as consumers can compose a single log statement containing different logging data, and removes the need to pass around a fake enumeration to describe the supplied logging data.