class documentation

Adapter that adds details to the log about the running workflow.

Values added to extra are merged with the extra dictionary from a logging call, with values from the logging call taking precedence. I.e. the behavior is that of merge_extra=True in Python >= 3.13.

Method __init__ Create the logger adapter.
Method isEnabledFor Override to ignore replay logs.
Method log Override to potentially disable the sandbox.
Method process Override to add workflow details.
Method unsafe_disable_sandbox Disable the sandbox during log processing. Can be turned back on with unsafe_disable_sandbox(False).
Instance Variable disable_sandbox Undocumented
Instance Variable full_workflow_info_on_extra Boolean for whether a workflow_info value will be added to the extra dictionary with the entire workflow info, making it present on the LogRecord.__dict__ for use by others. Default is False.
Instance Variable log_during_replay Boolean for whether logs should occur during replay. Default is False.
Instance Variable workflow_info_on_extra Boolean for whether a temporal_workflow dictionary value will be added to the extra dictionary with some workflow info, making it present on the LogRecord.__dict__ for use by others. Default is True.
Instance Variable workflow_info_on_message Boolean for whether a string representation of a dict of some workflow info will be appended to each message. Default is True.
Property base_logger Underlying logger usable for actions such as adding handlers/formatters.
def __init__(self, logger: logging.Logger, extra: Mapping[str, Any] | None): (source)

Create the logger adapter.

def isEnabledFor(self, level: int) -> bool: (source)

Override to ignore replay logs.

def log(self, level: int, msg: object, *args: Any, stacklevel: int = 1, **kwargs: Any): (source)

Override to potentially disable the sandbox.

def process(self, msg: Any, kwargs: MutableMapping[str, Any]) -> tuple[Any, MutableMapping[str, Any]]: (source)

Override to add workflow details.

def unsafe_disable_sandbox(self, value: bool = True): (source)

Disable the sandbox during log processing. Can be turned back on with unsafe_disable_sandbox(False).

disable_sandbox = (source)

Undocumented

full_workflow_info_on_extra: bool = (source)

Boolean for whether a workflow_info value will be added to the extra dictionary with the entire workflow info, making it present on the LogRecord.__dict__ for use by others. Default is False.

log_during_replay: bool = (source)

Boolean for whether logs should occur during replay. Default is False.

workflow_info_on_extra: bool = (source)

Boolean for whether a temporal_workflow dictionary value will be added to the extra dictionary with some workflow info, making it present on the LogRecord.__dict__ for use by others. Default is True.

workflow_info_on_message: bool = (source)

Boolean for whether a string representation of a dict of some workflow info will be appended to each message. Default is True.

Underlying logger usable for actions such as adding handlers/formatters.