mirror of
https://github.com/lnbits/lnbits.git
synced 2026-08-16 13:10:15 +02:00
fix: logging
This commit is contained in:
parent
87ae34d4b7
commit
ea75083663
1 changed files with 9 additions and 5 deletions
|
|
@ -150,12 +150,16 @@ class LightsparkSparkWallet(Wallet):
|
|||
)
|
||||
|
||||
print("### Spark sidecar DONE")
|
||||
await asyncio.to_thread(
|
||||
self._log_process_output, process
|
||||
)
|
||||
|
||||
# if process.stdout:
|
||||
# for line in process.stdout:
|
||||
# logger.info(f"Spark: {line}", end="")
|
||||
# else:
|
||||
# logger.warning(" No output captured for Spark sidecar.")
|
||||
def _log_process_output(self, process: subprocess.Popen):
|
||||
if process.stdout:
|
||||
for line in process.stdout:
|
||||
logger.info(f"Spark: {line}", end="")
|
||||
else:
|
||||
logger.warning(" No output captured for Spark sidecar.")
|
||||
|
||||
async def cleanup(self):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue