8000 [TwigBundle] Make deprecations scream in logs · symfony/symfony@0c10f97 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c10f97

Browse files
committed
[TwigBundle] Make deprecations scream in logs
1 parent 03cd9e5 commit 0c10f97

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,15 @@
1111

1212
<tbody>
1313
{% for log in logs %}
14-
<tr class="status-{{ log.priority >= 400 ? 'error' : log.priority >= 300 ? 'warning' : 'normal' }}">
14+
{% if log.priority >= 400 %}
15+
{% set status = 'error' %}
16+
{% elseif log.priority >= 300 %}
17+
{% set status = 'warning' %}
18+
{% else %}
19+
{% set severity = log.context.exception.severity|default(false) %}
20+
{% set status = severity is constant('E_DEPRECATED') or severity is constant('E_USER_DEPRECATED') ? 'warning' : 'normal' %}
21+
{% endif %}
22+
<tr class="status-{{ status }}">
1523
<td class="text-small" nowrap>
1624
<span class="colored text-bold">{{ log.priorityName }}</span>
1725
<span class="text-muted newline">{{ log.timestamp|date('H:i:s') }}</span>

0 commit comments

Comments
 (0)
0