@nsshunt/stsobservability 1.0.35 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4888,6 +4888,9 @@ class PublishTransportRESTServer extends STSOptionsBase {
4888
4888
  // Returns true for success or false for failure.
4889
4889
  __publicField(this, "Publish", async (payload) => {
4890
4890
  try {
4891
+ if (this.options.showPublishPayload) {
4892
+ console.log(chalk$1.grey(`PublishTransportRESTServer::Publish()`));
4893
+ }
4891
4894
  const encodedData = encode(payload, { ignoreUndefined: true });
4892
4895
  const headers = { "Content-Type": "application/octet-stream" };
4893
4896
  let retVal = null;
@@ -4924,9 +4927,15 @@ class PublishTransportRESTServer extends STSOptionsBase {
4924
4927
  }
4925
4928
  }
4926
4929
  if (retVal.status !== 200) {
4930
+ if (this.options.showPublishPayload) {
4931
+ console.log(chalk$1.red(`PublishTransportRESTServer::Publish() Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`));
4932
+ }
4927
4933
  this.options.logger.debug(chalk$1.red(`Error (_PerformPublishRESTAPI:_PerformPublish:#publishmessage): Invalid response from server: [${retVal.status}]`));
4928
4934
  return false;
4929
4935
  } else {
4936
+ if (this.options.showPublishPayload) {
4937
+ console.log(chalk$1.grey(`PublishTransportRESTServer::Publish() _PerformPublishRESTAPI:_PerformPublish:#publishmessage: [${this.options.url}] - Valid response from server: [${retVal.status}]`));
4938
+ }
4930
4939
  }
4931
4940
  return true;
4932
4941
  } catch (error) {