diff --git a/app.py b/app.py index dff7485..e8e7c6c 100644 --- a/app.py +++ b/app.py @@ -3,8 +3,6 @@ import re import uuid from flask import Flask, request, jsonify, send_from_directory import datetime -import sys -import logging app = Flask(__name__) app.config['UPLOAD_DIRECTORY'] = os.environ.get('UPLOAD_DIRECTORY', '/uploads') @@ -14,12 +12,6 @@ VALID_FILENAME_REGEX = r'^[a-zA-Z0-9\-_\.]+$' AUTH_TOKEN = os.environ.get('AUTH_TOKEN', 'myuploadtoken') -import sys -import logging - -app.logger.addHandler(logging.StreamHandler(sys.stdout)) -app.logger.setLevel(logging.INFO) - def is_valid_filename(filename): return bool(re.match(VALID_FILENAME_REGEX, filename)) diff --git a/gunicorn_config.py b/gunicorn_config.py index c7342ad..3d2e864 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -1,3 +1,4 @@ bind = "0.0.0.0:5000" workers = 2 threads = 4 +access-logfile -