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
@@ -5,6 +5,8 @@ import random
from os import getenv
from typing import Optional, AsyncGenerator
from loguru import logger
from .base import (
StatusResponse,
InvoiceResponse,
@@ -204,5 +206,5 @@ class SparkWallet(Wallet):
except (OSError, httpx.ReadError, httpx.ConnectError, httpx.ReadTimeout):
pass
print("lost connection to spark /stream, retrying in 5 seconds")
logger.error("lost connection to spark /stream, retrying in 5 seconds")
await asyncio.sleep(5)