The solution ensures all logs are managed according to the specified log level by adding a new logger that overrides the console object and substitutes it with a custom logger using Winston.
The log level can be adjusted via the TESTMRT_LOG_LEVEL environment variable.
Description
The solution ensures all logs are managed according to the specified log level by adding a new logger that overrides the console object and substitutes it with a custom logger using Winston.
The log level can be adjusted via the
TESTMRT_LOG_LEVEL
environment variable.The 3pp winston is already approved.
Types of Changes
Changes
How to Test-Drive This PR
A bundle has been published with some test console statements in the _app component on the
test-env-2
.test-env-2
environment.TESTMRT_LOG_LEVEL
value to "warn" using our cloud api key.Load the bundle home page
/
: https://scaffold-pwa-test-env-2.mobify-storefront.com/Verify that only logs with the log level "warn" and above are visible.
Repeat the same adjusting the
TESTMRT_LOG_LEVEL
value to "info".Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization