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:
@@ -8,6 +8,8 @@ from http import HTTPStatus
|
||||
from os import getenv
|
||||
from typing import Optional, AsyncGenerator
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from .base import (
|
||||
StatusResponse,
|
||||
InvoiceResponse,
|
||||
@@ -139,7 +141,7 @@ class OpenNodeWallet(Wallet):
|
||||
x = hmac.new(self.auth["Authorization"].encode("ascii"), digestmod="sha256")
|
||||
x.update(charge_id.encode("ascii"))
|
||||
if x.hexdigest() != data["hashed_order"]:
|
||||
print("invalid webhook, not from opennode")
|
||||
logger.error("invalid webhook, not from opennode")
|
||||
raise HTTPException(status_code=HTTPStatus.NO_CONTENT)
|
||||
|
||||
await self.queue.put(charge_id)
|
||||
|
||||
Reference in New Issue
Block a user