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
Methods
execute
▸ execute(input, next): Promise<unknown>
Called when Workflow execute method is called
Parameters
| Name | Type |
|---|---|
input | WorkflowExecuteInput |
next | OmitLastParam<(input: WorkflowExecuteInput, next: OmitLastParam<(input: WorkflowExecuteInput, next: OmitLastParam<...>) => Promise<unknown>>) => 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
| Name | Type |
|---|---|
input | GetLogAttributesInput |
next | OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<(input: GetLogAttributesInput, next: OmitLastParam<...>) => Record<string, unknown>>) => Record<string, unknown>> |
Returns
Record<string, unknown>