-
Notifications
You must be signed in to change notification settings - Fork 13
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
add cloud logs command #58
Conversation
rajatjindal
commented
Aug 11, 2023
8aa4826
to
b1c8913
Compare
3aee368
to
e39a0d7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to figure out if there's a way to do this without repeatedly downloading all logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding this Rajat! To @rylev's point, instead of getting all logs, can you update channel_logs
to take in max
aka count. The api_channels_id_logs_get
already has support for requesting n many logs and it is the latest n returned by journal.
I want to do that too. but lets say we start the tail command and fetched 100 lines of logs. now the app added 5 new line of logs. when we ask for 100 lines of logs again, how do we know that the last 5 are the latest ones to display? |
49137e9
to
e436683
Compare
I looked at the logging api code. if we can add ability to say "give me logs since ", then we might be able to circumvent the problem. I'll give that a try soon. cc @michelleN - I know you were looking at the logging api as well. |
this will fix #107 |
e436683
to
7588eca
Compare
6a7cfbc
to
b3e63c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the APIs to make this possible @rajatjindal
chatted with Ryan, and adding a color to prefix can be done as a follow up PR. thanks |
357c675
to
2f493b5
Compare
@kate-goldenring @rylev @itowlson @karthik2804 thank you for your feedback on this PR. I think this is now ready to be merged. please let me know if there are comments that I might have missed to address. thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think anything I have is blocking (though it would be highly desirable to get rid of that panic), but I don't feel I know enough to approve, sorry.
@itowlson, as always, thank you for your insightful feedback on this PR. |
2de7e89
to
2212dfb
Compare
Looking good @rajatjindal, just one question and one thing that I mentioned in a comment but forgot to log in the review - sorry about that! |
2212dfb
to
8adbbe9
Compare
Would you mind changing this to use the /api/apps/:id/logs endpoints? The latest version of the cloud-openapi client contains these endpoints. The channel log endpoints are planned to be deprecated soon. |
0787d17
to
ef05578
Compare
I have updated openapi client and updated the PR to use new endpoints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this end to end and everything looks great!
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some last second code nits. Feel free to merge this without addressing those!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @rajatjindal
Signed-off-by: Rajat Jindal <[email protected]>
Signed-off-by: Rajat Jindal <[email protected]>
69990ed
to
b4d6342
Compare