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
+4 -2
View File
@@ -5,6 +5,8 @@ import urllib.parse
from os import getenv
from typing import AsyncGenerator, Dict, Optional
from loguru import logger
import httpx
from websockets import connect
from websockets.exceptions import (
@@ -193,8 +195,8 @@ class EclairWallet(Wallet):
ConnectionClosedError,
ConnectionClosed,
) as ose:
print("OSE", ose)
logger.error("OSE", ose)
pass
print("lost connection to eclair's websocket, retrying in 5 seconds")
logger.error("lost connection to eclair's websocket, retrying in 5 seconds")
await asyncio.sleep(5)