Developer Preview — This project is in active development. APIs may change. Provide feedback
Skip to content

@salesforce/b2c-tooling-sdk / operations/logs / extractPaths

Function: extractPaths()

extractPaths(message): string[]

Defined in: packages/b2c-tooling-sdk/src/operations/logs/path-normalizer.ts:230

Extracts all cartridge paths from a message.

Useful for testing or analysis of log messages.

Parameters

message

string

Log message to extract paths from

Returns

string[]

Array of extracted paths

Example

typescript
const paths = extractPaths("Error at (app_storefront/cartridge/controllers/Home.js:45)");
// Returns: ["app_storefront/cartridge/controllers/Home.js:45"]

Released under the Apache-2.0 License.