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.
This commit is contained in:
Tobias Diekershoff 2024-05-09 10:27:25 +02:00
parent 765af10f00
commit bf278adb15
2 changed files with 25 additions and 1 deletions

View file

@ -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;
}

View file

@ -50,7 +50,7 @@
style="cursor:pointer;"
title="{{$l10n.Click_to_view_details}}">
<td>{{$row->date}}</td>
<td>{{$row->level}}</td>
<td class="loglevel-{{$row->level|lower}}">{{$row->level}}</td>
<td>{{$row->context}}</td>
<td>{{$row->message}}</td>
</tr>