Container logs disappear after stopping the container
I have this script (
src/test.sh
):
And this Dockerfile:
When I run the container in RunPod (via the GraphQL endpoint using runpod-python
) Working ...
is printed out to the Container logs window as expected. However, after the 10 seconds when the container is killed the log disappear and is replaced with No Container logs yet, this usually means that the pod is still initializing
. Both states are shown in screenshots.
Can someone please help me with accessing the logs even after the container is stopped?Solution:Jump to solution
we do not store logs once you stop the pod, they're only meant to be there for the life of running pod, you can push your logs to another service if needed, we may plan to have a central logging place for this in future
6 Replies
Solution
we do not store logs once you stop the pod, they're only meant to be there for the life of running pod, you can push your logs to another service if needed, we may plan to have a central logging place for this in future
How can I access the logs programmatically so that I can push them to another service like you recommend?
you would stream the logs from your container directly to another service, you can find opensource libs that can do that for you
This doesn't include docker system and docker container logs though does it?
nope only container logs
we plan to introduce logging services where we will stream the logs for you automatically, thats sometime later this year
Thank you!