From 19aebcc3271e2bd9228681d1a8928a837467b247 Mon Sep 17 00:00:00 2001 From: Brain Date: Wed, 26 Jan 2022 21:43:31 +0100 Subject: [PATCH] Use app logger instead of root logger --- app.py | 2 +- ki/actions/seed.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index b2cc263..dfba6ee 100644 --- a/app.py +++ b/app.py @@ -40,6 +40,6 @@ CORS(app) db = SQLAlchemy(app) migrate = Migrate(app, db, compare_type=True) -logging.debug("Hello from KI") +app.logger.info("Hello from KI") from ki import module # noqa diff --git a/ki/actions/seed.py b/ki/actions/seed.py index 2ccf157..170d58f 100644 --- a/ki/actions/seed.py +++ b/ki/actions/seed.py @@ -3,7 +3,6 @@ # SPDX-License-Identifier: AGPL-3.0-or-later import csv -import logging from app import app, db 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(): 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: csv_reader = csv.DictReader(file)