Compare commits

..

No commits in common. "881c3d3038312d0b7032c70cd29c9d69b6e85727" and "f1ecbadf05ce35592b1610297421ee0240daca96" have entirely different histories.

4
app.py
View File

@ -10,6 +10,7 @@ from flask import Flask
from flask_cors import CORS from flask_cors import CORS
from flask_migrate import Migrate from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy from flask_sqlalchemy import SQLAlchemy
from ldap3.utils.log import logger as ldap3_logger
from ldap3.utils.log import set_library_log_detail_level, BASIC from ldap3.utils.log import set_library_log_detail_level, BASIC
load_dotenv(find_dotenv()) load_dotenv(find_dotenv())
@ -21,8 +22,7 @@ loglevel = os.getenv("KI_LOGLEVEL", logging.WARNING)
loglevel = int(loglevel) loglevel = int(loglevel)
app.logger.setLevel(loglevel) app.logger.setLevel(loglevel)
app.logger.propagate = False # do not forward messages to the root logger app.logger.propagate = False # do not forward messages to the root logger
logging.basicConfig(level=loglevel, logging.basicConfig(level=loglevel, format='[%(asctime)s] %(levelname)s [%(name)s] %(message)s') # configure root logger as fallback
format='[%(asctime)s] %(levelname)s [%(name)s] %(message)s') # configure root logger as fallback
logging.getLogger('werkzeug').propagate = False # werkzeug has its own ColorStreamHandler logging.getLogger('werkzeug').propagate = False # werkzeug has its own ColorStreamHandler
set_library_log_detail_level(BASIC) # ldap3 has different verbosity levels internally set_library_log_detail_level(BASIC) # ldap3 has different verbosity levels internally