Skip to content

Durabletask logger is not respecting root_logger #102

Description

@larohra

The durabletask package creates its own logger using logging.Logger() directly (not logging.getLogger()), which means it creates an independent logger that doesn't respect the root logger configuration.

def get_logger(
        name_suffix: str,
        log_handler: Optional[logging.Handler] = None,
        log_formatter: Optional[logging.Formatter] = None) -> logging.Logger:
    logger = logging.Logger(f"durabletask-{name_suffix}")

Ideally, the package should be using logging.getLogger() since that enables all customers/clients to easily disable or modify the verbosity of the durabletask-* packages as they need.

 # Explicitly suppress third-party package logs
logging.getLogger("durabletask-worker").setLevel(logging.WARNING)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions