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

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

Interface: TailLogsOptions

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:77

Options for tailing logs.

Extends

Properties

lastEntries?

optional lastEntries: number

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:93

Number of recent entries to show per file on startup. Set to 0 to skip initial entries and only show new ones.

Default

ts
1

maxEntries?

optional maxEntries: number

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:99

Maximum number of entries to collect before stopping. When set, the tail operation will automatically stop after collecting this many entries. Useful for programmatic access.


onEntry()?

optional onEntry: (entry) => void

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:65

Called for each new log entry

Parameters

entry

LogEntry

Returns

void

Inherited from

TailLogsCallbacks.onEntry


onError()?

optional onError: (error) => void

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:67

Called when an error occurs

Parameters

error

Error

Returns

void

Inherited from

TailLogsCallbacks.onError


onFileDiscovered()?

optional onFileDiscovered: (file) => void

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:69

Called when a new log file is discovered

Parameters

file

LogFile

Returns

void

Inherited from

TailLogsCallbacks.onFileDiscovered


onFileRotated()?

optional onFileRotated: (file) => void

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:71

Called when file rotation is detected (file size decreased)

Parameters

file

LogFile

Returns

void

Inherited from

TailLogsCallbacks.onFileRotated


pathNormalizer()?

optional pathNormalizer: (message) => string

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:104

Path normalizer function to convert remote paths to local paths. Called on each log message to make paths clickable in IDEs.

Parameters

message

string

Returns

string


pollInterval?

optional pollInterval: number

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:87

Polling interval in milliseconds.

Default

ts
3000

prefixes?

optional prefixes: string[]

Defined in: packages/b2c-tooling-sdk/src/operations/logs/types.ts:82

Filter by log prefixes (e.g., ["error", "customerror"]).

Default

ts
["error", "customerror"]

Released under the Apache-2.0 License.