Skip to content

do not configure logging on import, use named logger - #116

Open
dracador wants to merge 1 commit into
seatable:masterfrom
dracador:fix-library-logging
Open

do not configure logging on import, use named logger#116
dracador wants to merge 1 commit into
seatable:masterfrom
dracador:fix-library-logging

Conversation

@dracador

Copy link
Copy Markdown

convert_airtable.py was configuring the logger for the root level, which clashes with other loggers that are properly configured via a logging dict, like how it's done normally in applications like django.

In applications that configure their own
logging this caused duplicated log lines and third-party output in seatable's format.

It should be possible to toggle seatable_api logging on explicitly if it's needed.

In general, libraries should only configure their own named logging space. See https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library

`convert_airtable.py` was configuring the logger for the root level,
which clashes with other loggers that are properly configured via a
logging dict, like how it's done normally in applications like django.

In applications that configure their own
logging this caused duplicated log lines and third-party output in
seatable's format.

It should be possible to toggle seatable_api logging on explicitly if it's needed.

In general, libraries should only configure their own named logging space.
See https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant