Resolving issues from code review
This commit is contained in:
parent
0e8c4580ed
commit
c7147274f0
|
@ -9,22 +9,12 @@ logging_config = {
|
|||
},
|
||||
'alembic.runtime.migration': {
|
||||
'handlers': ['console', 'file'],
|
||||
'level': 'WARN',
|
||||
'level': 'ERROR',
|
||||
'propagate': False
|
||||
},
|
||||
'urllib3.connectionpool': {
|
||||
'handlers': ['console', 'file'],
|
||||
'level': 'WARN',
|
||||
'propagate': False
|
||||
},
|
||||
'elasticsearch': {
|
||||
'handlers': ['console', 'file'],
|
||||
'level': 'WARN',
|
||||
'propagate': False
|
||||
},
|
||||
'ElasticIndex': {
|
||||
'handlers': ['console', 'file'],
|
||||
'level': 'WARN',
|
||||
'level': 'ERROR',
|
||||
'propagate': False
|
||||
},
|
||||
},
|
||||
|
@ -48,7 +38,7 @@ logging_config = {
|
|||
"level": "DEBUG"
|
||||
},
|
||||
"file": {
|
||||
"level": "DEBUG",
|
||||
"level": "INFO",
|
||||
"formatter": "simple",
|
||||
"class": "logging.FileHandler",
|
||||
"filename": "cr_connect.log"
|
||||
|
|
|
@ -18,9 +18,6 @@ from sentry_sdk.integrations.flask import FlaskIntegration
|
|||
from apscheduler.schedulers.background import BackgroundScheduler
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
|
||||
from config.logging import logging_config
|
||||
logging.config.dictConfig(logging_config)
|
||||
|
||||
connexion_app = connexion.FlaskApp(__name__)
|
||||
|
||||
app = connexion_app.app
|
||||
|
@ -30,9 +27,13 @@ app.config.from_object('config.default')
|
|||
if "TESTING" in os.environ and os.environ["TESTING"] == "true":
|
||||
app.config.from_object('config.testing')
|
||||
app.config.from_pyfile('../config/testing.py')
|
||||
import logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
else:
|
||||
app.config.root_path = app.instance_path
|
||||
app.config.from_pyfile('config.py', silent=True)
|
||||
from config.logging import logging_config
|
||||
logging.config.dictConfig(logging_config)
|
||||
|
||||
|
||||
db = SQLAlchemy(app)
|
||||
|
|
Loading…
Reference in New Issue