isset($line['command']) && $line['command'],
'flex gap-2',
])>
diff --git a/resources/views/livewire/project/shared/get-logs.blade.php b/resources/views/livewire/project/shared/get-logs.blade.php
index 129bf8135..f031690a5 100644
--- a/resources/views/livewire/project/shared/get-logs.blade.php
+++ b/resources/views/livewire/project/shared/get-logs.blade.php
@@ -6,6 +6,7 @@
fullscreen: false,
alwaysScroll: false,
intervalId: null,
+ colorLogs: localStorage.getItem('coolify-color-logs') === 'true',
searchQuery: '',
renderTrigger: 0,
containerName: '{{ $container ?? "logs" }}',
@@ -44,6 +45,30 @@
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(line) {
if (!this.searchQuery.trim()) return true;
return line.toLowerCase().includes(this.searchQuery.toLowerCase());
@@ -174,7 +199,7 @@ class="flex items-center justify-between gap-2 px-4 py-2 border-b dark:border-co
class="absolute left-2 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none">Lines:
+ class="input input-sm w-32 pl-11 text-center dark:bg-coolgray-300" />
@@ -221,6 +246,15 @@ class="p-1 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-
d="M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
+