Skip to content

Better to use logger = logging.getLogger(__name__) in example? #36

Description

@johnthagen

In the example on the PyPI page:

...
# Create a logger object.
logger = logging.getLogger('your-module')
...

Would this be better to write as:

...
# Create a logger object.
logger = logging.getLogger(__name__)
...

I've always thought this was best practice and also removes a DRY problem. Happy to PR if you think this would be an improvement.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions