Skip to main content

Class: 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>

Called when Workflow execute method is called

Parameters​

input​

WorkflowExecuteInput

next​

OmitLastParam<(input, next) => Promise<unknown>>

Returns​

Promise<unknown>

result of the Workflow execution

Implementation of​

WorkflowInboundCallsInterceptor.execute


getLogAttributes()​

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

Called on each invocation of the workflow.log methods.

The attributes returned in this call are attached to every log message.

Parameters​

input​

GetLogAttributesInput

next​

OmitLastParam<(input, next) => Record<string, unknown>>

Returns​

Record<string, unknown>

Implementation of​

WorkflowOutboundCallsInterceptor.getLogAttributes