Use app logger instead of root logger

This commit is contained in:
Brain 2022-01-26 21:43:31 +01:00
parent 0fcd407006
commit 19aebcc327
Signed by untrusted user: Brain
GPG Key ID: 9CF47083EE57670D
2 changed files with 2 additions and 3 deletions

2
app.py
View File

@ -40,6 +40,6 @@ CORS(app)
db = SQLAlchemy(app) db = SQLAlchemy(app)
migrate = Migrate(app, db, compare_type=True) migrate = Migrate(app, db, compare_type=True)
logging.debug("Hello from KI") app.logger.info("Hello from KI")
from ki import module # noqa from ki import module # noqa

View File

@ -3,7 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
import csv import csv
import logging
from app import app, db from app import app, db
from ki.models import Address, Contact, ContactType, Language, Skill, Profile, ProfileLanguage, ProfileSearchtopic, \ from ki.models import Address, Contact, ContactType, Language, Skill, Profile, ProfileLanguage, ProfileSearchtopic, \
@ -13,7 +12,7 @@ from ki.models import Address, Contact, ContactType, Language, Skill, Profile, P
def seed_contacttypes(): def seed_contacttypes():
contacttypes_seed_file_path = app.config["KI_DATA_DIR"] + "/seed_data/contacttypes.csv" contacttypes_seed_file_path = app.config["KI_DATA_DIR"] + "/seed_data/contacttypes.csv"
logging.info("importing contacttypes") app.logger.info("importing contacttypes")
with open(contacttypes_seed_file_path) as file: with open(contacttypes_seed_file_path) as file:
csv_reader = csv.DictReader(file) csv_reader = csv.DictReader(file)