Remove execution info from workflow/activity logs in python

Hello wondering, if it’s possible to pass a parameter to remove temporal data from the logger? E.g remove ({'activity_id': '2', 'activity_type': 'print_msg', 'attempt': 1, 'namespace': 'default', 'task_queue': 'onboarding-tasks', 'workflow_id': 'test-workflow-b6c8c0dd-8b0b-440c-a4e9-9c2f194cba57', 'workflow_run_id': '416c0bca-ca53-4709-a34f-3e30170a1601', 'workflow_type': 'Test'}) .

@activity.defn
async def print_msg(msg):
    activity.logger.info(f"Executing { msg }")
    activity.logger.warning(f"Executing { msg }", extra={})
    activity.logger.error(f"Executing { msg }", extra={})
    activity.logger.critical(f"Executing { msg }", extra={})

    return True

Gives

2025-04-16 15:00:02 - temporalio.activity - [INFO]      Executing activity_b ({'activity_id': '2', 'activity_type': 'print_msg', 'attempt': 1, 'namespace': 'default', 'task_queue': 'onboarding-tasks', 'workflow_id': 'test-workflow-b6c8c0dd-8b0b-440c-a4e9-9c2f194cba57', 'workflow_run_id': '416c0bca-ca53-4709-a34f-3e30170a1601', 'workflow_type': 'Test'})
2025-04-16 15:00:02 - temporalio.activity - [WARNING]   Executing activity_b ({'activity_id': '2', 'activity_type': 'print_msg', 'attempt': 1, 'namespace': 'default', 'task_queue': 'onboarding-tasks', 'workflow_id': 'test-workflow-b6c8c0dd-8b0b-440c-a4e9-9c2f194cba57', 'workflow_run_id': '416c0bca-ca53-4709-a34f-3e30170a1601', 'workflow_type': 'Test'})
2025-04-16 15:00:02 - temporalio.activity - [ERROR]     Executing activity_b ({'activity_id': '2', 'activity_type': 'print_msg', 'attempt': 1, 'namespace': 'default', 'task_queue': 'onboarding-tasks', 'workflow_id': 'test-workflow-b6c8c0dd-8b0b-440c-a4e9-9c2f194cba57', 'workflow_run_id': '416c0bca-ca53-4709-a34f-3e30170a1601', 'workflow_type': 'Test'})
2025-04-16 15:00:02 - temporalio.activity - [CRITICAL]  Executing activity_b ({'activity_id': '2', 'activity_type': 'print_msg', 'attempt': 1, 'namespace': 'default', 'task_queue': 'onboarding-tasks', 'workflow_id': 'test-workflow-b6c8c0dd-8b0b-440c-a4e9-9c2f194cba57', 'workflow_run_id': '416c0bca-ca53-4709-a34f-3e30170a1601', 'workflow_type': 'Test'})

As you can see it can become really cumbersome!
Thanks

Not a per-log parameter, but workflow.logger.workflow_info_on_message = False and activity.logger.activity_info_on_message = False can be set on application startup (there are similar on_extra forms if you care more about the extra dict than the message). If you need per-each-log-call customization, you’ll have to have your own adapter/handler.