Skip to content

Commit f15fb2f

Browse files
committed
debug_log: bring it back
1 parent ff4ed2f commit f15fb2f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/warnet/bitcoin.py

+14
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
kexec,
2323
pod_log,
2424
)
25+
from .process import run_command
2526

2627

2728
@click.group(name="bitcoin")
@@ -81,6 +82,19 @@ def _rpc(tank: str, method: str, params: tuple[str, ...]) -> str:
8182
return stdout + stderr
8283

8384

85+
@bitcoin.command()
86+
@click.argument("tank", type=str, required=True)
87+
def debug_log(tank: str):
88+
"""
89+
Fetch the Bitcoin Core debug log from <tank pod name>
90+
"""
91+
cmd = f"warnet logs {tank}"
92+
try:
93+
print(run_command(cmd))
94+
except Exception as e:
95+
print(f"{e}")
96+
97+
8498
@bitcoin.command()
8599
@click.argument("pattern", type=str, required=True)
86100
@click.option("--show-k8s-timestamps", is_flag=True, default=False, show_default=True)

0 commit comments

Comments
 (0)