Skip to content

Commit fbb0d90

Browse files
committed
add logging to indicate when stuff is successfully setup
1 parent 47d1606 commit fbb0d90

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from os import environ as env
1515

1616
if env.get("SENTRY_DSN"):
17+
app.logger.info("Detected Sentry DSN, setting up sentry...")
18+
1719
import sentry_sdk
1820
sentry_sdk.init(
1921
dsn=env.get("SENTRY_DSN"),
@@ -26,6 +28,8 @@
2628
def create_app(config_filename=None):
2729
app = Flask(__name__)
2830
if env.get("TRUSTED_PROXY_COUNT"):
31+
app.logger.info("Detected value for TRUSTED_PROXY_COUNT, setting up ProxyFix..." + env.get("TRUSTED_PROXY_COUNT"))
32+
2933
# for example if the request goes through one proxy
3034
# before hitting your application server
3135
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=int(env.get("TRUSTED_PROXY_COUNT") or 0))

0 commit comments

Comments
 (0)