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

Support new version of logs #169

Merged
merged 15 commits into from
Dec 30, 2022
Merged

Support new version of logs #169

merged 15 commits into from
Dec 30, 2022

Conversation

rolljee
Copy link
Contributor

@rolljee rolljee commented Nov 23, 2022

Overview

This improves the log output for the PaaS, by using the new back-end API, and by adding more filter options.

The standard output is very similar to what Docker Compose uses so that people are not too bothered by the logs:

kourou_logs

What changed?

  • Improve the output of the logs by prefixing them by the colored name of the pod they come from;
  • Add the -f/--follow flag to stream the logs from the PaaS in real-time;
  • Add the -n/--tail flag to specify the number of logs from the end to receive from each pod;
  • Add the -t/--timestamp flag to display the timestamp of each log line;
  • Add the --podName flag to filter by pod;
  • Add the --since flag to specify the time from which to retrieve logs;
  • Add the --until flag to specify the time from which to stop retrieving logs.

Copy link
Contributor

@Aschen Aschen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a remark on the code.

Apart form that, can you please:

  • assign this PR to yourself
  • add the label

return currentName === max.name ? end : end + (max.length - currentName.length);
}

getRandomChalkColor() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this function you can end up with the same color for 2 pods. Maybe it would be better to iterate over pods with an index and use this index to select a color

@rolljee
Copy link
Contributor Author

rolljee commented Nov 30, 2022

Just a remark on the code.

Apart form that, can you please:

* assign this PR to yourself

* add the label

I didn't assign myself because the PR wasn't fully completed, and the work will be taken by @Kuruyia i will put this PR as draft and let him add the proper label and assignement 👍

@Kuruyia Kuruyia marked this pull request as ready for review December 2, 2022 16:09
@Kuruyia Kuruyia requested a review from Aschen December 2, 2022 16:09
@alexandrebouthinon alexandrebouthinon changed the base branch from develop to 1-dev December 7, 2022 10:43
@Aschen
Copy link
Contributor

Aschen commented Dec 29, 2022

@Kuruyia LGTM 👍

I let you merge it since I'm not sure about the release timing for this one

@rolljee
Copy link
Contributor Author

rolljee commented Dec 30, 2022

This can be merged

@rolljee rolljee merged commit 85d6a2c into 1-dev Dec 30, 2022
@rolljee rolljee deleted the fix/paas-logs branch December 30, 2022 09:29
@rolljee rolljee restored the fix/paas-logs branch January 9, 2023 10:54
@rolljee rolljee deleted the fix/paas-logs branch January 9, 2023 11:54
@rolljee rolljee restored the fix/paas-logs branch January 9, 2023 13:34
@rolljee rolljee deleted the fix/paas-logs branch January 9, 2023 13:45
@rolljee rolljee mentioned this pull request Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants