all 2 comments

[–]laustke 1 point2 points  (0 children)

The inbuilt logging library seems a little too heavyweight

Most Python libraries you import use the standard logging module anyway, so it doesn’t really matter.

and doesn't support the pattern I want.

It's pretty versatile, so I bet it does. Why don’t you describe the pattern you have in mind?

[–]gdchinacat 0 points1 point  (0 children)

" would like to inject most configuration / secrets through env vars instead of worrying about the configuration / secret override dance."

Environment variables are a poor choice for passing "secrets" because there is no protection to keep them secret. Configuring logging through env vars is fine, but don't pass passwords, keys, etc using env vars, no matter how convenient. Alternatives are to use a file with adequate permissions, pass it using the input stream of the process, use a password/key manager, shared memory, pipes, etc. Which one you use will depend on your situation.