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

Draft
wants to merge 6 commits into
base: next
Choose a base branch
from
Draft

[WIP]: Improve logs #2598

wants to merge 6 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
@ayntk-ai
Copy link

ayntk-ai 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

@ayntk-ai
Copy link

@yohannlog Looks amazing. Thank you so much.

@ayntk-ai
Copy link

ayntk-ai 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 ]

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

Successfully merging this pull request may close these issues.

None yet

3 participants