mirror of
https://github.com/friendica/friendica
synced 2024-12-23 03:20:15 +00:00
Merge pull request #14146 from annando/loglevels
Improve the log level display
This commit is contained in:
commit
104d355096
4 changed files with 30 additions and 12 deletions
|
@ -66,6 +66,9 @@ class Settings extends BaseAdmin
|
|||
parent::content();
|
||||
|
||||
$log_choices = [
|
||||
LogLevel::EMERGENCY => 'Emergency',
|
||||
LogLevel::ALERT => 'Alert',
|
||||
LogLevel::CRITICAL => 'Critical',
|
||||
LogLevel::ERROR => 'Error',
|
||||
LogLevel::WARNING => 'Warning',
|
||||
LogLevel::NOTICE => 'Notice',
|
||||
|
|
|
@ -47,6 +47,8 @@ class View extends BaseAdmin
|
|||
$filters_valid_values = [
|
||||
'level' => [
|
||||
'',
|
||||
LogLevel::EMERGENCY,
|
||||
LogLevel::ALERT,
|
||||
LogLevel::CRITICAL,
|
||||
LogLevel::ERROR,
|
||||
LogLevel::WARNING,
|
||||
|
@ -54,7 +56,7 @@ class View extends BaseAdmin
|
|||
LogLevel::INFO,
|
||||
LogLevel::DEBUG,
|
||||
],
|
||||
'context' => ['', 'index', 'worker'],
|
||||
'context' => ['', 'index', 'worker', 'daemon'],
|
||||
];
|
||||
$filters = [
|
||||
'level' => $_GET['level'] ?? '',
|
||||
|
|
|
@ -773,3 +773,13 @@ figure.img-allocated-height img{
|
|||
color: #731289; /* purple */
|
||||
font-weight: bold;
|
||||
}
|
||||
.loglevel-alert {
|
||||
color: #ff0000; /* red */
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
.loglevel-emergency {
|
||||
color: #731289; /* purple */
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
|
@ -65,11 +65,14 @@
|
|||
data-data="{{$row->data}}" data-source="{{$row->source}}">
|
||||
<td>{{$row->date}}</td>
|
||||
<td class="
|
||||
{{if $row->level == "CRITICAL"}}bg-danger
|
||||
{{if $row->level == "EMERGENCY"}}bg-danger
|
||||
{{elseif $row->level == "ALERT"}}bg-danger
|
||||
{{elseif $row->level == "CRITICAL"}}bg-danger
|
||||
{{elseif $row->level == "ERROR"}}bg-danger
|
||||
{{elseif $row->level == "WARNING"}}bg-warning
|
||||
{{elseif $row->level == "NOTICE"}}bg-info
|
||||
{{elseif $row->level == "DEBUG"}}text-muted
|
||||
{{elseif $row->level == "INFO"}}bg-info
|
||||
{{else}}text-muted
|
||||
{{/if}}
|
||||
">{{$row->level}}</td>
|
||||
<td>{{$row->context}}</td>
|
||||
|
|
Loading…
Reference in a new issue