Skip to content

Commit

Permalink
Merge pull request #220 from wasade/logging_and_missing_library
Browse files Browse the repository at this point in the history
Logging and missing library
  • Loading branch information
wasade committed Jun 15, 2020
2 parents 78c6f89 + b865aa5 commit ab109a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions microsetta_private_api/server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
import secrets
import logging

from microsetta_private_api.config_manager import SERVER_CONFIG
from flask import jsonify
Expand Down Expand Up @@ -66,6 +67,11 @@ def build_app():
# attach the reverse proxy mechanism
app.app.wsgi_app = ReverseProxied(app.app.wsgi_app)

if not SERVER_CONFIG['debug']:
gunicorn_logger = logging.getLogger('gunicorn.error')
app.app.logger.handlers = gunicorn_logger.handlers
app.app.logger.setLevel(gunicorn_logger.level)

@app.route('/americangut/static/<path:filename>')
def reroute_americangut(filename):
# This is dumb as rocks, but it fixes static images referenced in
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
'static/img/*',
'static/vendor/js/*',
'static/vendor/js/jquery.form-4.2.2/*',
'static/vendor/jquery-ui-1.12.1/*',
'static/vendor/jquery-ui-1.12.1/images/*',
'static/vendor/bootstrap-4.4.1-dist/js/*',
'static/vendor/bootstrap-4.4.1-dist/css/*',
'static/vendor/bootstrap-datetimepicker-4.14.30/*',
Expand Down

0 comments on commit ab109a1

Please sign in to comment.