Use app logger instead of root logger
This commit is contained in:
parent
0fcd407006
commit
19aebcc327
2
app.py
2
app.py
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user