vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/logs.html.twig line 1

Open in your IDE?
  1. {% set channel_is_defined = (logs|first).channel is defined %}
  2. <table class="logs">
  3.     <thead>
  4.         <tr>
  5.             <th>Level</th>
  6.             {% if channel_is_defined %}<th>Channel</th>{% endif %}
  7.             <th class="full-width">Message</th>
  8.         </tr>
  9.     </thead>
  10.     <tbody>
  11.     {% for log in logs %}
  12.         {% if log.priority >= 400 %}
  13.             {% set status = 'error' %}
  14.         {% elseif log.priority >= 300 %}
  15.             {% set status = 'warning' %}
  16.         {% else %}
  17.             {% set severity = log.context.exception.severity|default(false) %}
  18.             {% set status = severity is constant('E_DEPRECATED') or severity is constant('E_USER_DEPRECATED') ? 'warning' : 'normal' %}
  19.         {% endif %}
  20.         <tr class="status-{{ status }}">
  21.             <td class="text-small" nowrap>
  22.                 <span class="colored text-bold">{{ log.priorityName }}</span>
  23.                 <span class="text-muted newline">{{ log.timestamp|date('H:i:s') }}</span>
  24.             </td>
  25.             {% if channel_is_defined %}
  26.                 <td class="text-small text-bold nowrap">
  27.                     {{ log.channel }}
  28.                 </td>
  29.             {% endif %}
  30.             <td>{{ log.message|format_log_message(log.context) }}</td>
  31.         </tr>
  32.     {% endfor %}
  33.     </tbody>
  34. </table>