Skip to content

Commit

Permalink
Merge pull request #468 from bitcoin-dev-project/scenario-stderr
Browse files Browse the repository at this point in the history
Add stderr to scenario output
  • Loading branch information
pinheadmz authored Aug 20, 2024
2 parents cc5b420 + 7f6cf24 commit b37dc83
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/warnet/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ def setup_rpc(self):
self.jsonrpc.register(self.logs_grep)

def scenario_log(self, proc):
while not proc.stdout:
while not proc.stdout and not proc.stderr:
time.sleep(0.1)
for line in proc.stdout:
self.scenario_logger.info(line.decode().rstrip())
for line in proc.stderr:
self.scenario_logger.error(line.decode().rstrip())

def get_warnet(self, network: str) -> Warnet:
"""
Expand Down

0 comments on commit b37dc83

Please sign in to comment.