You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log Center has a quota on the # of messages that can be emitted per day.
Out of the box, PWA Kit logs at least one line for every HTTP request/response including its path, response status code and timing.
At scale, these this logging exhausts the Log Center quota.
It would be great if the PWA Kit (or alternatively MRT) had the ability to control which logs would be emitted to Log Center.
This might be an environment variables in the PWA Kit eg. PWA_KIT_LOG_LEVEL=error where on logs at or above the set level are logged. Alternatively, this might be a distinct configuration option on a Managed Runtime environment.
If you wanted to change the behaviour of the PWA Kit access logs today you would need to:
Subclass RemoteServerFactory providing an implementation of _setupLogging. You could choose to drop all access logs or alternative only log request/responses with the specific status codes you're interested in.
Implement a version of getRuntime using your subclass from above.
Managed Runtime environments can be configured to send logs to B2C Log Center:
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/debugging.html#debug-using-log-center
Log Center has a quota on the # of messages that can be emitted per day.
Out of the box, PWA Kit logs at least one line for every HTTP request/response including its path, response status code and timing.
At scale, these this logging exhausts the Log Center quota.
It would be great if the PWA Kit (or alternatively MRT) had the ability to control which logs would be emitted to Log Center.
This might be an environment variables in the PWA Kit eg.
PWA_KIT_LOG_LEVEL=error
where on logs at or above the set level are logged. Alternatively, this might be a distinct configuration option on a Managed Runtime environment.If you wanted to change the behaviour of the PWA Kit access logs today you would need to:
RemoteServerFactory
providing an implementation of_setupLogging
. You could choose to drop all access logs or alternative only log request/responses with the specific status codes you're interested in.getRuntime
using your subclass from above.getRuntime
inssr.js
.The text was updated successfully, but these errors were encountered: