From 863fe794a8b6aa82b761dc07e63f30866437df23 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 5 Dec 2025 09:55:12 +0100 Subject: [PATCH] Add colorized log levels to runtime logs with toggle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add color toggle button (paint brush icon) to runtime logs toolbar - Color log lines by level: error (red), warning (yellow), debug (purple), info (blue) - Store color preference in localStorage ('coolify-color-logs') - Widen Lines input from w-24 to w-32 for better usability - Remove color features from deployment logs (keeping it cleaner) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../application/deployment/show.blade.php | 42 +---------------- .../project/shared/get-logs.blade.php | 46 +++++++++++++++++-- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/resources/views/livewire/project/application/deployment/show.blade.php b/resources/views/livewire/project/application/deployment/show.blade.php index 8615e0bf5..e5d1ce8e6 100644 --- a/resources/views/livewire/project/application/deployment/show.blade.php +++ b/resources/views/livewire/project/application/deployment/show.blade.php @@ -10,7 +10,6 @@ alwaysScroll: {{ $isKeepAliveOn ? 'true' : 'false' }}, intervalId: null, showTimestamps: true, - colorLogs: localStorage.getItem('coolify-color-logs') === 'true', searchQuery: '', renderTrigger: 0, deploymentId: '{{ $application_deployment_queue->deployment_uuid ?? 'deployment' }}', @@ -49,30 +48,6 @@ this.intervalId = null; } }, - toggleColorLogs() { - this.colorLogs = !this.colorLogs; - localStorage.setItem('coolify-color-logs', this.colorLogs); - }, - getLogLevel(text) { - const lowerText = text.toLowerCase(); - // Error detection (highest priority) - if (/\b(error|err|failed|failure|exception|fatal|panic|critical)\b/.test(lowerText)) { - return 'error'; - } - // Warning detection - if (/\b(warn|warning|wrn|caution)\b/.test(lowerText)) { - return 'warning'; - } - // Debug detection - if (/\b(debug|dbg|trace|verbose)\b/.test(lowerText)) { - return 'debug'; - } - // Info detection - if (/\b(info|inf|notice)\b/.test(lowerText)) { - return 'info'; - } - return null; - }, matchesSearch(text) { if (!this.searchQuery.trim()) return true; return text.toLowerCase().includes(this.searchQuery.toLowerCase()); @@ -250,15 +225,6 @@ class="p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text- d="M12 12.75c1.148 0 2.278.08 3.383.237 1.037.146 1.866.966 1.866 2.013 0 3.728-2.35 6.75-5.25 6.75S6.75 18.728 6.75 15c0-1.046.83-1.867 1.866-2.013A24.204 24.204 0 0 1 12 12.75Zm0 0c2.883 0 5.647.508 8.207 1.44a23.91 23.91 0 0 1-1.152 6.06M12 12.75c-2.883 0-5.647.508-8.208 1.44.125 2.104.52 4.136 1.153 6.06M12 12.75a2.25 2.25 0 0 0 2.248-2.354M12 12.75a2.25 2.25 0 0 1-2.248-2.354M12 8.25c.995 0 1.971-.08 2.922-.236.403-.066.74-.358.795-.762a3.778 3.778 0 0 0-.399-2.25M12 8.25c-.995 0-1.97-.08-2.922-.236-.402-.066-.74-.358-.795-.762a3.734 3.734 0 0 1 .4-2.253M12 8.25a2.25 2.25 0 0 0-2.248 2.146M12 8.25a2.25 2.25 0 0 1 2.248 2.146M8.683 5a6.032 6.032 0 0 1-1.155-1.002c.07-.63.27-1.222.574-1.747m.581 2.749A3.75 3.75 0 0 1 15.318 5m0 0c.427-.283.815-.62 1.155-.999a4.471 4.471 0 0 0-.575-1.752M4.921 6a24.048 24.048 0 0 0-.392 3.314c1.668.546 3.416.914 5.223 1.082M19.08 6c.205 1.08.337 2.187.392 3.314a23.882 23.882 0 0 1-5.223 1.082" /> - +