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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user