Skip to content

Commit 364576e

Browse files
committed
_logs: do a container name dance 'bitcoincore'
We need to specify a container name when we have prometheus logging enabled b/c we end up with a couple containers per pod.
1 parent 2382625 commit 364576e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/warnet/control.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,10 @@ def _logs(pod_name: str, follow: bool):
286286
else:
287287
return # cancelled by user
288288

289+
container_name = "bitcoincore" if pod_name.startswith("tank") else None
290+
289291
try:
290-
stream = pod_log(pod_name, container_name=None, follow=follow)
292+
stream = pod_log(pod_name, container_name=container_name, follow=follow)
291293
for line in stream.stream():
292294
print(line.decode("utf-8"), end=None)
293295
except Exception as e:

0 commit comments

Comments
 (0)