Skip to content

Commit

Permalink
itest: log swapd commandline arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
JssDWt committed Dec 13, 2024
1 parent 63a83f8 commit 8bcdfb9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions itest/tests/swapd.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def __init__(
self.prefix = "swapd-%d" % (swapd_id)
self.process_dir = process_dir
self.opts = SWAPD_CONFIG.copy()
self.logger = logging.getLogger("SwapD")

opts = {
"address": "127.0.0.1:{}".format(grpc_port),
Expand Down Expand Up @@ -101,10 +102,11 @@ def start(self, stdin=None, wait_for_initialized=True, stderr_redir=False):
self.opts["bitcoind-rpc-address"] = "http://127.0.0.1:{}".format(
self.bitcoindproxy.rpcport
)
self.logger.debug("starting swapd with commandline", self.cmd_line)
TailableProc.start(self, stdin, stdout_redir=True, stderr_redir=stderr_redir)
if wait_for_initialized:
self.wait_for_log("swapd started")
logging.info("SwapD started")
self.logger.info("SwapD started")

def wait(self, timeout=TIMEOUT):
"""Wait for the daemon to stop for up to timeout seconds
Expand Down Expand Up @@ -454,6 +456,7 @@ def __init__(self, port=0):
self.port = port
self.request_count = 0
self.quotient = 1
self.logger = logging.getLogger("WhatTheFee")

def get_fees(self):
self.request_count += 1
Expand Down Expand Up @@ -496,12 +499,12 @@ def start(self):
while self.server.bind_addr[1] == 0:
pass
self.port = self.server.bind_addr[1]
logging.debug("WhatTheFee api listening on port {}".format(self.port))
self.logger.debug("WhatTheFee api listening on port {}".format(self.port))

def stop(self):
self.server.stop()
self.proxy_thread.join()
logging.debug(
self.logger.debug(
"WhatTheFee api shut down after processing {} requests".format(
self.request_count
)
Expand Down

0 comments on commit 8bcdfb9

Please sign in to comment.