|
@@ -1,4 +1,5 @@
|
|
|
import random
|
|
|
+import logging
|
|
|
|
|
|
from gevent import monkey
|
|
|
monkey.patch_all()
|
|
@@ -22,8 +23,34 @@ from user2new import user2new
|
|
|
from params_helper import Params
|
|
|
# from werkzeug.middleware.profiler import ProfilerMiddleware
|
|
|
|
|
|
+# import sentry_sdk
|
|
|
+# from sentry_sdk.integrations.flask import FlaskIntegration
|
|
|
+#
|
|
|
+# sentry_sdk.init(
|
|
|
+# dsn="https://3960f1cb8cbe49768f77efcfdbdcec50@o1288299.ingest.sentry.io/6504932",
|
|
|
+# integrations=[
|
|
|
+# FlaskIntegration(),
|
|
|
+# ],
|
|
|
+#
|
|
|
+# # Set traces_sample_rate to 1.0 to capture 100%
|
|
|
+# # of transactions for performance monitoring.
|
|
|
+# # We recommend adjusting this value in production.
|
|
|
+# traces_sample_rate=1.0,
|
|
|
+#
|
|
|
+# # By default the SDK will try to use the SENTRY_RELEASE
|
|
|
+# # environment variable, or infer a git commit
|
|
|
+# # SHA as release, however you may want to set
|
|
|
+# # something more human-readable.
|
|
|
+# # release="myapp@1.0.0",
|
|
|
+# )
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
+
|
|
|
+# handler = logging.FileHandler('app.log', encoding='utf-8')
|
|
|
+# logging_format = logging.Formatter('%(asctime)s - %(levelname)s - %(filename)s- %(funcName)s - %(lineno): %(message)s')
|
|
|
+# handler.setFormatter(logging_format)
|
|
|
+# app.logger.addHandler(handler)
|
|
|
+
|
|
|
#app.wsgi_app = ProfilerMiddleware(app.wsgi_app)
|
|
|
log_ = Log()
|
|
|
config_ = set_config()
|