loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.44k stars 311 forks source link

Add logs option to check container output #958

Closed gjhenrique closed 3 months ago

gjhenrique commented 4 months ago

Is your feature request related to a problem?
No. It's not an issue per se

Which solution do you suggest?
We're wrapping devpod to run the development environment for dozens of projects . It would be nice to show developers the logs of the dev container for better introspectability, maybe as a new option; devpod logs for example.

Which alternative solutions exist?
One could use docker logs (or kubectl logs if using the k8s provider) using the right labels, but it would be better to have this inside devpod

Additional context
I can add some code if you feel like it's not in your roadmap, given the right directions. We could even add a new option for custom drivers if you think it's a good idea.

pascalbreuninger commented 3 months ago

Hi @gjhenrique, great idea. Added a devpod logs $WORKSPACE_ID command. Currently works only with machine (cloud) providers and local providers. Will update the kubernetes provider in the next step

gjhenrique commented 3 months ago

Thanks @pascalbreuninger. That was surprisingly fast.

You're doing an awesome job building this product. Keep it up :muscle:

I took the new feature for a spin and it's working flawlessly.