From a1b99cff51a580099a3137b16bec718a4346d647 Mon Sep 17 00:00:00 2001 From: David Megginson Date: Wed, 22 Jul 2020 12:00:33 -0400 Subject: [PATCH] Disable default logging (have to add log handlers explicitly). Fixes #333 --- hxl_proxy/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hxl_proxy/__init__.py b/hxl_proxy/__init__.py index 62911df8..94403b0d 100644 --- a/hxl_proxy/__init__.py +++ b/hxl_proxy/__init__.py @@ -7,7 +7,7 @@ Documentation: http://hxlstandard.org """ -import os +import logging, os import requests_cache from flask import Flask, g, request @@ -24,6 +24,9 @@ # Main application object app = Flask(__name__) +# Disable default logging (we'll add any log handlers explicitly in deployment) +app.logger.addHandler(logging.NullHandler) + # Handle subpaths app.wsgi_app = reverse_proxied.ReverseProxied(app.wsgi_app)