🔊(prod) move logging config up to Base configuration class #719
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Make it possible to set logging configuration on a per-deployment basis in production, so we can actually see our application logs in our production environment.
Proposal
Currently, LOGGING is defined only on the Development class. This means that the Staging, PreProduction and Production classes, which are used in our prod environments, do not define any logger options. As a result, our production environments use the default Python logging configuration: a log level of WARNING, and no timestamping of logs, among other things.
This PR moves up the LOGGING definition, to the Base class, this way Production and subclasses will inherit it. This will make INFO the default log level for the root and app loggers. This definition includes an environment variable mapping, so we can still configure a different log level for those if necessary.