Skip to content
Snippets Groups Projects
Commit c27986f1 authored by kaiyou's avatar kaiyou
Browse files

Enable debug logging when DEBUG is on

parent a82649c6
No related branches found
No related tags found
No related merge requests found
import os
import logging
DEFAULT_CONFIG = {
......@@ -36,6 +37,9 @@ class ConfigManager(dict):
key: self.__coerce_value(os.environ.get(key, value))
for key, value in DEFAULT_CONFIG.items()
})
# update the logging config if necessary
if self.config.get("DEBUG", False):
logging.basicConfig(level=logging.DEBUG)
# update the app config itself
app.config = self
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment