Skip to content

Commit 985218d

Browse files
committed
cli: implement 'bitcoin debug_log' using kubectl
1 parent 1736635 commit 985218d

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/warnet/cli/bitcoin.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,17 @@ def rpc(node, method, params, network):
2424
run_command(cmd)
2525

2626

27-
# @bitcoin.command()
28-
# @click.argument("node", type=int, required=True)
29-
# @click.option("--network", default="warnet", show_default=True)
30-
# def debug_log(node, network):
31-
# """
32-
# Fetch the Bitcoin Core debug log from <node> in [network]
33-
# """
34-
# print(rpc_call("tank_debug_log", {"node": node, "network": network}))
35-
#
36-
#
27+
@bitcoin.command()
28+
@click.argument("node", type=int, required=True)
29+
@click.option("--network", default="warnet", show_default=True)
30+
def debug_log(node, network):
31+
"""
32+
Fetch the Bitcoin Core debug log from <node> in [network]
33+
"""
34+
cmd = f"kubectl logs warnet-node-{node}"
35+
run_command(cmd)
36+
37+
3738
# @bitcoin.command()
3839
# @click.argument("node_a", type=int, required=True)
3940
# @click.argument("node_b", type=int, required=True)

0 commit comments

Comments
 (0)