Skip to main content

Class: WorkflowLogInterceptor

worker.WorkflowLogInterceptor

This interceptor used to be meant to log Workflow execution starts and completions, and attaches log attributes to workflow.log calls. It is now deprecated and behaves as a noop in all cases. It is only kept arround to avoid breaking code out there that was previously refering to it.

Deprecated

WorkflowLogInterceptor is deprecated. Workflow lifecycle events are now automatically logged by the SDK. To customize workflow log attributes, simply register a custom WorkflowInterceptors that intercepts the outbound.getLogAttributes() method.

Implements​

Constructors​

constructor​

• new WorkflowLogInterceptor(): WorkflowLogInterceptor

Returns​

WorkflowLogInterceptor

Methods​

execute​

▸ execute(input, next): Promise<unknown>

Parameters​

NameType
inputWorkflowExecuteInput
nextOmitLastParam<(input: WorkflowExecuteInput, next: OmitLastParam<(input: WorkflowExecuteInput, next: OmitLastParam<...>) => Promise<unknown>>) => Promise<unknown>>

Returns​

Promise<unknown>

Implementation of​

WorkflowInboundCallsInterceptor.execute


getLogAttributes​

▸ getLogAttributes(input, next): Record<string, unknown>

Parameters​

NameType
inputGetLogAttributesInput
nextOmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>) => Record<string, unknown>>

Returns​

Record<string, unknown>

Implementation of​

WorkflowOutboundCallsInterceptor.getLogAttributes