Skip to content

Client logger configuration uses root logger that cannot be superseded downstream #52

Description

@jayckaiser

They issue was originally raised by @ea-mtenhoor.

When initializing the EdFiClient class, we configure the root logger directly for client-logging. This prevents scripts that use the edfi_api_client package from configuring the root logger themselves.

This is unexpected behavior; Python packages should use their own logger instance that is agnostic to the root logger used in scripts that implement them. We should consider using a package-specific logger here instead of root. This can be done using the logging.getLogger() method. (I will also note that the logging package documentation explicitly calls out this behavior as bad design practice.)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions