How to select which service to get logs from in the CLI?
Hello.
I tried to use the CLI to get logs from one of the services in my project, but sadly the CLI was showing me the logs of another service.
Cheking all the options of the CLI doesn't seem possible to target specific services or get all the logs, it seems to focus on the latest service that was built.
Is this a limitation?
Solution:Jump to solution
https://github.com/railwayapp/cli/pull/448 for reference
GitHub
Fix
railway logs
pulling from the wrong deployment by Milo123459 ...This fixes #436
This also fixes this for linked environments
This also makes sure it pulls from the latest active deployment, not just the latest deployment
10 Replies
Project ID:
N/A
N/A
oh yeah that is broken, seems like the cli picks a service from the project alphanumerically and displays it's logs instead of the linked service
what is a "linked service" ? the CLI doesn't allow me to pick any service when linking
yes it does, you run
railway service
but that still doesn't print the logs from the linked service, this is a bug@Brody - we are talking quite a bit about CLI dev, can you raise an issue on the repo? I will raise internally.
I have a feeling either me or jr already created an issue on the repo for this
indeed, jr has opened an issue
https://github.com/railwayapp/cli/issues/436
So linking is not done by
railway link
?from
railway help
milo and I have been working on a fix for this and things are looking good so far, we are just pending on more testsSolution
https://github.com/railwayapp/cli/pull/448 for reference
GitHub
Fix
railway logs
pulling from the wrong deployment by Milo123459 ...This fixes #436
This also fixes this for linked environments
This also makes sure it pulls from the latest active deployment, not just the latest deployment