From bf278adb15f8088bba0e5d8bc30c966f35747ad7 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Thu, 9 May 2024 10:27:25 +0200 Subject: [PATCH] admin panel - colorize error levels With this patch the error levels shown in the Admin Panel -> Log view are coloured according to severity. Starting from green for debug, over orange for notices to bold red for errors and criticals. --- view/global.css | 24 ++++++++++++++++++++++++ view/templates/admin/logs/view.tpl | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/view/global.css b/view/global.css index aab6e8d67d..9dbca10963 100644 --- a/view/global.css +++ b/view/global.css @@ -749,3 +749,27 @@ figure.img-allocated-height img{ width: 48px; height: 48px; } + +/** + * Log levels colorized in the admin panel + **/ +.loglevel-debug { + color: #00ff00; /* green */ +} +.loglevel-info { + color: #013220; /* dark green */ +} +.loglevel-notice { + color: #ffa500; /* orange */ +} +.loglevel-warning { + color: #ff8c00; /* dark orange */ +} +.loglevel-error { + color: #ff0000; /* red */ + font-weight: bold; +} +.loglevel-critical { + color: #8b0000; /* dark red */ + font-weight: bold; +} diff --git a/view/templates/admin/logs/view.tpl b/view/templates/admin/logs/view.tpl index 50e166f1ba..719299ad9b 100644 --- a/view/templates/admin/logs/view.tpl +++ b/view/templates/admin/logs/view.tpl @@ -50,7 +50,7 @@ style="cursor:pointer;" title="{{$l10n.Click_to_view_details}}"> {{$row->date}} - {{$row->level}} + {{$row->level}} {{$row->context}} {{$row->message}}