Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Remove logging.basicConfig call #67

Merged

Conversation

micktwomey
Copy link
Contributor

Importing dogapi results in a logging.basicConfig() call which can cause problems for application logging config later.

basicConfig() only takes effect once (since it only applies config changes if there are no handlers configured), so it's generally good practise to only call it in the main() of an app before any other logging happens.

Calling logging.info(..) (or other handlers) implicitly calls basicConfig anyway, so it's usually not necessary for a library to call basicConfig to get basic ERROR and WARNING level messages written to stderr if no other logging configuration has been done.

Importing dogapi was results in a logging.basicConfig() call which can
cause problems for application logging config later.
clofresh added a commit that referenced this pull request May 5, 2014
@clofresh clofresh merged commit 98b189f into DataDog:master May 5, 2014
@clofresh
Copy link
Contributor

clofresh commented May 5, 2014

You're right, thanks for the PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants