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

[WIP]: Improve logs #2598

Closed
wants to merge 7 commits into from
Closed

[WIP]: Improve logs #2598

wants to merge 7 commits into from

Conversation

yohannlog
Copy link

@yohannlog yohannlog commented Jun 19, 2024

[ UPDATED 24/06/2024 ]

I've decided to completely overhaul the way logs are managed. The current system doesn't save logs, and this is a major problem. What's more, adding a backup system on top of the old one is quite restrictive. That's why I decided to implement several things:

Major change:

Features:

  • Save logs in files ( {container_id}/{dd_mm_yy.csv} ) with rotation and file size limits
  • Save logs in database
  • Send logs to custom service ?
  • Add a page dedicated to logs with history (New button to left menu)
  • Add "Show more" buttons on large logs
  • Supports ANSI color format
  • Add tabs when multiple servers in one page
  • Add a "Download button"
  • Add a checkbox to download using max lines
  • Add type="number" to max lines input
  • Add search filter
  • Add option to download logs on only filtered logs
  • Add styles to logs ?
  • Add a wrap lines checkbox so that log lines are automatically wrapped (to viewport size).
  • Save wrap lines option
  • Add style for + and - button (For wrapping lines)
  • Make time clickable to filter logs
  • Review the code in GetLogs.php to simplify it (duplicate code, etc.).

This PR or later

  • Manage json logs format

If I need to, I'll make a design modification to keep it readable and understandable.

@yohannlog yohannlog changed the title feat: add logs download button [WIP]: Improve logs Jun 19, 2024
@yohannlog yohannlog marked this pull request as draft June 19, 2024 12:51
@peaklabs-dev
Copy link
Member

peaklabs-dev commented Jun 19, 2024

No idea if this can work but for logs that are very long a wrap lines feature would be handy:

  • Add a wrap lines checkbox so that log lines are automatically wrapped (to viewport size).

@yohannlog
Copy link
Author

For the moment, I did that:
image

@peaklabs-dev
Copy link
Member

@yohannlog Looks amazing. Thank you so much.

@peaklabs-dev
Copy link
Member

peaklabs-dev commented Jun 19, 2024

Add styles to logs ?

@yohannlog I think this would be possible, for example, errors could be highlighted in red, success in green, warning in orange/yellow and the rest in white.

@yohannlog
Copy link
Author

Add styles to logs ?

@yohannlog I think this would be possible, for example, errors could be highlighted in red, success in green, warning in orange/yellow and the rest in white.

The only thing I can test is show colors from logs generated by an application. It is complicated to determine what log type it is.

@iamEvanYT
Copy link
Contributor

The only thing I can test is show colors from logs generated by an application. It is complicated to determine what log type it is.

Showing colors generated by an application sounds cool.

@yohannlog
Copy link
Author

I've added a discussion about this PR: #2618

@yohannlog
Copy link
Author

[ PR TEXT UPDATED ]

Copy link

gitguardian bot commented Jul 4, 2024

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- - GitHub App Keys ccbbfd8 database/seeders/GithubAppSeeder.php View secret
- - Generic Password e1bcae7 templates/compose/resend.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@peaklabs-dev
Copy link
Member

peaklabs-dev commented Sep 30, 2024

This pull request is currently in draft status. We would like to merge the current changes, so please finish the current changes and take the PR out of draft status. If no action is taken, this PR will be closed for inactivity. I moved all you other change ideas to your discussion here #2618 (comment)

@peaklabs-dev
Copy link
Member

If you decide to work on this again, feel free to open a new PR that is also up to date with the latest available version.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants