{% set channel_is_defined = (logs|first).channel is defined %} {% if channel_is_defined %}{% endif %} {% for log in logs %} {% if log.priority >= 400 %} {% set status = 'error' %} {% elseif log.priority >= 300 %} {% set status = 'warning' %} {% else %} {% set severity = log.context.exception.severity|default(false) %} {% set status = severity is constant('E_DEPRECATED') or severity is constant('E_USER_DEPRECATED') ? 'warning' : 'normal' %} {% endif %} {% if channel_is_defined %} {% endif %} {% endfor %}
LevelChannelMessage
{{ log.priorityName }} {{ log.timestamp|date('H:i:s') }} {{ log.channel }} {{ log.message|format_log_message(log.context) }} {% if log.context ?? false %}
{{ log.context|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_UNESCAPED_UNICODE') b-or constant('JSON_UNESCAPED_SLASHES')) }}
{% endif %}