use logger in app.py

This commit is contained in:
dni ⚡ 2022-09-27 14:14:36 +02:00
parent affec50a3d
commit 7aba2f989c

View File

@ -31,8 +31,6 @@ from .helpers import (
url_for_vendored,
)
from .requestvars import g
# from .settings import WALLET
from .tasks import (
catch_everything_and_restart,
check_pending_payments,
@ -119,7 +117,7 @@ def check_settings(app: FastAPI):
admin_set = await get_admin_settings()
if admin_set:
break
print("Waiting for admin settings... retrying in 5 seconds!")
logger.info("Waiting for admin settings... retrying in 5 seconds!")
await asyncio.sleep(5)
admin_set.admin_users = removeEmptyString(admin_set.admin_users.split(","))
@ -129,7 +127,7 @@ def check_settings(app: FastAPI):
admin_set.theme = removeEmptyString(admin_set.theme.split(","))
admin_set.ad_space = removeEmptyString(admin_set.ad_space.split(","))
g().admin_conf = conf.copy(update=admin_set.dict())
print(
logger.info(
f" ✔️ Access admin user account at: http://{lnbits.settings.HOST}:{lnbits.settings.PORT}/wallet?usr={admin_set.user}"
)