Compare commits

..

2 Commits

Author SHA1 Message Date
881c3d3038 Merge pull request 'Code Style reparieren' (!65) from fix/code-style into main
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Reviewed-on: #65
2022-02-28 18:53:14 +01:00
d60acd169b
fix code style
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2022-02-28 18:48:32 +01:00

4
app.py
View File

@ -10,7 +10,6 @@ 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())
@ -22,7 +21,8 @@ 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, format='[%(asctime)s] %(levelname)s [%(name)s] %(message)s') # configure root logger as fallback logging.basicConfig(level=loglevel,
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