Skip to content

Commit 56b758c

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 7ccb072 commit 56b758c

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
@@ -289,8 +289,10 @@ def _logs(pod_name: str, follow: bool):
289289
else:
290290
return # cancelled by user
291291

292+
container_name = "bitcoincore" if pod_name.startswith("tank") else None
293+
292294
try:
293-
stream = pod_log(pod_name, container_name=None, follow=follow)
295+
stream = pod_log(pod_name, container_name=container_name, follow=follow)
294296
for line in stream.stream():
295297
print(line.decode("utf-8"), end=None)
296298
except Exception as e:

0 commit comments

Comments
 (0)