-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
All the log records emitted by workflow.logger has the same file, path and lineno pointing to workflow.LoggingAdapter.log.
Minimal Reproduction
import logging
import sys
from temporalio import workflow
class Formatter(logging.Formatter):
def format(self, record) -> str:
return f"path: {record.pathname}"
formatter = Formatter()
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(formatter)
log = logging.getLogger("")
log.setLevel(logging.INFO)
log.addHandler(handler)
@workflow.defn
class Workflow:
@workflow.run
async def run(self) -> None:
workflow.logger.info("message")This prints <...>/temporalio/workflow.py instead of the file where workflow is defined.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working