Logging with loguru (#708)

* logging

* requirements

* add loguru dependency

* restore it

* add loguru

* set log level in .env file

* remove service fee print

* set log level

* more logging

* more logging

* more logging

* pyament.checking_id

* fix
This commit is contained in:
calle
2022-07-07 14:30:16 +02:00
committed by GitHub
parent 847fd18796
commit 089313f613
40 changed files with 202 additions and 81 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ from fastapi import Query
from fastapi.params import Depends
from starlette.exceptions import HTTPException
from loguru import logger
from lnbits.core.crud import get_user
from lnbits.core.services import create_invoice
from lnbits.core.views.api import api_payment
@@ -88,6 +90,6 @@ async def api_tpos_check_invoice(tpos_id: str, payment_hash: str):
status = await api_payment(payment_hash)
except Exception as exc:
print(exc)
logger.error(exc)
return {"paid": False}
return status