Skip to content

@salesforce/b2c-tooling-sdk / operations/mrt / getLogsWebSocketUrl

Function: getLogsWebSocketUrl() ​

getLogsWebSocketUrl(origin): string

Defined in: packages/b2c-tooling-sdk/src/operations/mrt/tail-logs.ts:187

Transforms the MRT cloud origin URL into the logs WebSocket URL.

Replaces the cloud prefix in the hostname with logs and switches the protocol to wss://.

Parameters ​

origin ​

string

Returns ​

string

Example ​

ts
getLogsWebSocketUrl('https://cloud.mobify.com')
// → 'wss://logs.mobify.com'

getLogsWebSocketUrl('https://cloud-soak.mrt-soak.com')
// → 'wss://logs-soak.mrt-soak.com'

Released under the Apache-2.0 License.