coolify
coolify copied to clipboard
[WIP]: Improve logs
[ 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:
- [ ] Create a service dedicated to logging. (https://github.com/yohannlog/coolify-logs)
- [ ] Add API support
- [ ] Send logs to this service
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
- [x] 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 ?
- [x] 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.
No idea if this can work but for logs that are very long a wrap lines feature would be handy:
- [x] Add a wrap lines checkbox so that log lines are automatically wrapped (to viewport size).
For the moment, I did that:
@yohannlog Looks amazing. Thank you so much.
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.
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.
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.
I've added a discussion about this PR: #2618
[ PR TEXT UPDATED ]
⚠️ 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 | ccbbfd89087d948f83d99d8006aada81dcf906fc | database/seeders/GithubAppSeeder.php | View secret |
| - | - | Generic Password | e1bcae7aafb83563e1b34aceef5d15d079c2211d | templates/compose/resend.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
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 https://github.com/coollabsio/coolify/discussions/2618#discussioncomment-10802524
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.