diff --git a/src/Controller/DoctorController.php b/src/Controller/DoctorController.php index 88b74575..cb316a08 100644 --- a/src/Controller/DoctorController.php +++ b/src/Controller/DoctorController.php @@ -175,8 +175,10 @@ class DoctorController extends AbstractController $result = []; - if ($iterator->valid()) { + try { $result = iterator_to_array($iterator); + } catch (\Exception $ex) { + $result = ['ATTENTION: Failed reading log file']; } if (!is_writable($logfile)) { diff --git a/templates/activity/index.html.twig b/templates/activity/index.html.twig index d32d45b4..94f12533 100644 --- a/templates/activity/index.html.twig +++ b/templates/activity/index.html.twig @@ -12,7 +12,7 @@ } %} {% for field in metaColumns %} {% set columns = columns|merge({ - ('mf_' ~ field.name): {'title': field.label, 'class': 'hidden-xs hidden-sm', 'orderBy': false} + ('mf_' ~ field.name): {'title': field.label|trans, 'class': 'hidden-xs hidden-sm', 'orderBy': false} }) %} {% endfor %} {% if showVisibility %} @@ -58,7 +58,7 @@
Your logfile is larger than 50 MB, consider deleting it (it will be re-created automatically).
{% endif %} -{% for logLine in logs %}
- {{- logLine -}}
- {% endfor %}
+ {% for logLine in logs -%}
+ {%- set logLineClass = '' -%}
+ {%- if '.CRITICAL' in logLine -%}
+ {%- set logLineClass = 'text-danger text-bold' -%}
+ {%- elseif '.ERROR' in logLine -%}
+ {%- set logLineClass = 'text-warning text-bold' -%}
+ {%- elseif '.DEBUG' in logLine -%}
+ {%- set logLineClass = 'text-muted' -%}
+ {%- endif -%}
+ {{- logLine -}}
+ {%- endfor %}
{% endblock %}
{% endembed %}
diff --git a/templates/project/index.html.twig b/templates/project/index.html.twig
index 30f282bf..4038358f 100644
--- a/templates/project/index.html.twig
+++ b/templates/project/index.html.twig
@@ -12,7 +12,7 @@
} %}
{% for field in metaColumns %}
{% set columns = columns|merge({
- ('mf_' ~ field.name): {'title': field.label, 'class': 'hidden-xs hidden-sm', 'orderBy': false}
+ ('mf_' ~ field.name): {'title': field.label|trans, 'class': 'hidden-xs hidden-sm', 'orderBy': false}
}) %}
{% endfor %}
{% set columns = columns|merge({
@@ -52,7 +52,7 @@