You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
494 B
Python

4 years ago
import logging
import requests
4 years ago
from logging.config import dictConfig
from flask import render_template
4 years ago
from app.factory import create_app
4 years ago
app = create_app()
4 years ago
@app.errorhandler(requests.exceptions.ConnectionError)
def request_connection_error(e):
return render_template('error.html'), 500
4 years ago
if __name__ == '__main__':
app.run()
4 years ago
gunicorn_logger = logging.getLogger('gunicorn.error')
app.logger.handlers = gunicorn_logger.handlers
app.logger.setLevel(gunicorn_logger.level)