Improvements to Extension server logging

With this release, the extension server logging is enhanced to provide additional context during request processing and error stack traces for the asynchronous promise rejections. Below are a couple of examples of additional context information:

  1. {"clusterId":"Worker 1","endpoint":"/ccstorex/custom/v1/test","level":"debug","message":"Timetakentofindroute:0.9995","requestId":"pEDPhbGF7zODx/c4zmjGL+5jk4Y=","requestMethod":"GET","timestamp":"2024-01-03T20:32:46.300Z"}

  2. {"clusterId":"Worker 1","endpoint":"/ccstorex/custom/v1/asyncPromiseError","level":"error","message":"Unhandled Promise rejection error","requestId":"pEDPhbGF7zODx/c4zmjGL+5jk4Y=","requestMethod":"GET","timestamp":"2024-01-03T20:32:46.301Z", "stack":"Error: This is an asynchronous exception\n at demo (/occsapp/custom-server/extensions/extracted/externalShippingCalculator/js/lib/calculate-shipping-demo.js:182:9)\n at”}

Extension developers benefit from this enhanced logging which provides the endpoint URL, request method, and error stack traces for asynchronous promise rejections. This feature helps to analyze, troubleshoot, and quickly fix the issues.

Steps to Enable

You don't need to do anything to enable this feature.