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
+7 -2
View File
@@ -11,6 +11,9 @@ import base64
import hashlib
from os import environ, error, getenv
from typing import Optional, Dict, AsyncGenerator
from loguru import logger
from .macaroon import load_macaroon, AESCipher
if imports_ok:
@@ -187,6 +190,8 @@ class LndWallet(Wallet):
checking_id = stringify_checking_id(i.r_hash)
yield checking_id
except error:
print(error)
logger.error(error)
print("lost connection to lnd InvoiceSubscription, please restart lnbits.")
logger.error(
"lost connection to lnd InvoiceSubscription, please restart lnbits."
)