Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lagoon logs command #232

Closed
smlx opened this issue Jul 8, 2022 · 1 comment · Fixed by #285
Closed

lagoon logs command #232

smlx opened this issue Jul 8, 2022 · 1 comment · Fixed by #285
Labels
discussion Have a discussion about something

Comments

@smlx
Copy link
Member

smlx commented Jul 8, 2022

Is your feature request related to a problem? Please describe.
Sometimes it might be easier to request logs from a Lagoon environment via the command line. This is simpler in cases where you know exactly which project/env you want to see logs for.

Describe the solution you'd like
It would be great if I could run a command like this and have logs printed to my terminal:

lagoon logs --project=... --environment=... --log-type=[application,router,container]

Describe alternatives you've considered
The logging web UI is fine, but sometimes a CLI is better and probably faster.

Additional context
This feature request would have to know about the logging solution of your specific installation of Lagoon, and probably be tied to Opensearch. I'm not sure if it would be better for the CLI to go through a Lagoon API endpoint for logs, or if it makes more sense to query Opensearch directly.

I'm also not sure if this idea even makes sense; this issue is just a discussion starter.

@smlx smlx added the discussion Have a discussion about something label Jul 8, 2022
@shreddedbacon
Copy link
Member

If we were to do something like this, due to how the API works/processes things, I think it would be best to try and query the Opensearch directly.

I do like the idea of being able to query logs, and I know Lagoon team has had discussions in the past about streaming/dumping logs from the pods themselves in a similar way to how SSH currently works, so this may be an alternative option too. I know it may not cover the same use-case as being able to query for historical logs like against Opensearch though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Have a discussion about something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants