vendor/symfony/twig-bundle/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" data-filter-level="Emergency,Alert,Critical,Error,Warning,Notice,Info,Debug" data-filters>
  3.     <thead>
  4.         <tr>
  5.             <th data-filter="level">Level</th>
  6.             {% if channel_is_defined %}<th data-filter="channel">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 }}" data-filter-level="{{ log.priorityName|lower }}"{% if channel_is_defined %} data-filter-channel="{{ log.channel }}"{% endif %}>
  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>
  31.                 {{ log.message|format_log_message(log.context) }}
  32.                 {% if log.context ?? false %}
  33.                     <pre class="text-muted prewrap m-t-5">{{ log.context|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_UNESCAPED_UNICODE') b-or constant('JSON_UNESCAPED_SLASHES')) }}</pre>
  34.                 {% endif %}
  35.             </td>
  36.         </tr>
  37.     {% endfor %}
  38.     </tbody>
  39. </table>