---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / getLogsWebSocketUrl

# Function: getLogsWebSocketUrl()

> **getLogsWebSocketUrl**(`origin`): `string`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/tail-logs.ts:187](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/mrt/tail-logs.ts#L187)

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'
```
