Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Python logging best practices #56

Open
lukasschwab opened this issue Apr 12, 2021 · 1 comment
Open

Use Python logging best practices #56

lukasschwab opened this issue Apr 12, 2021 · 1 comment
Assignees
Labels
enhancement Requests for new features or improvements.

Comments

@lukasschwab
Copy link
Owner

Motivation

A clear and concise description of what the problem is. For example, "I'm always frustrated when..."

  • Change how logging is exposed. Setting the logging level is difficult. There must be a standard Python pattern for this, e.g. using a named logger with a name other than __name__.
  • Change internal logging usage: logging upon error construction can be misleading, esp. when errors are nonterminal (i.e. resolved in retries). Unreliable results: pages from API are unexpectedly empty #43 (comment)

Solution

A clear and concise description of what you want to happen.

TODO

@lukasschwab lukasschwab added the enhancement Requests for new features or improvements. label Apr 12, 2021
@lukasschwab lukasschwab self-assigned this Apr 12, 2021
@lukasschwab
Copy link
Owner Author

This was improved with 347327a, but there's still room for improvement.

  • Standardizing log messaging (e.g. punctuation).
  • Promoting essential extra fields into messages. Standardizing extra field names to make them easier to format.
  • Unit tests for evergreen logging behavior, e.g. logging retries.
  • Creating child loggers for each .get() generator.

Wouldn't mind some input from someone confident in their Python logging patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests for new features or improvements.
Projects
None yet
Development

No branches or pull requests

1 participant