Commit 0f6b7bdc authored by Enrico Tröger's avatar Enrico Tröger
Browse files

Introduce PDNS_ADMIN_LOG_LEVEL to change the log level

By setting the environment variable PDNS_ADMIN_LOG_LEVEL to a Python
support log level, PowerDNS-Admin will use that log level.
parent 1cd42304
......@@ -13,8 +13,12 @@ def create_app(config=None):
from .assets import assets
app = Flask(__name__)
# Read log level from environment variable
log_level_name = os.environ.get('PDNS_ADMIN_LOG_LEVEL', 'WARNING')
log_level = logging.getLevelName(log_level_name.upper())
# Setting logger
"[%(asctime)s] [%(filename)s:%(lineno)d] %(levelname)s - %(message)s")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment