<commit_before>{% set channel_is_defined = (logs|first).channel is defined %}

<table class="logs">
    <thead>
        <tr>
            <th>Level</th>
            {% if channel_is_defined %}<th>Channel</th>{% endif %}
            <th class="full-width">Message</th>
        </tr>
    </thead>

    <tbody>
    {% for log in logs %}
        <tr class="status-{{ log.priority >= 400 ? 'error' : log.priority >= 300 ? 'warning' : 'normal' }}">
            <td class="text-small" nowrap>
                <span class="colored text-bold">{{ log.priorityName }}</span>
                <span class="text-muted newline">{{ log.timestamp|date('H:i:s') }}</span>
            </td>
            {% if channel_is_defined %}
                <td class="text-small text-bold nowrap">
                    {{ log.channel }}
                </td>
            {% endif %}
            <td>{{ log.message }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table><commit_msg>Fix log message formatting in exception views<commit_after>{% set channel_is_defined = (logs|first).channel is defined %}

<table class="logs">
    <thead>
        <tr>
            <th>Level</th>
            {% if channel_is_defined %}<th>Channel</th>{% endif %}
            <th class="full-width">Message</th>
        </tr>
    </thead>

    <tbody>
    {% for log in logs %}
        <tr class="status-{{ log.priority >= 400 ? 'error' : log.priority >= 300 ? 'warning' : 'normal' }}">
            <td class="text-small" nowrap>
                <span class="colored text-bold">{{ log.priorityName }}</span>
                <span class="text-muted newline">{{ log.timestamp|date('H:i:s') }}</span>
            </td>
            {% if channel_is_defined %}
                <td class="text-small text-bold nowrap">
                    {{ log.channel }}
                </td>
            {% endif %}
            <td>{{ log.message|format_log_message(log.context) }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
{'fraction_non_alphanumeric': 0.18034447821681865, 'fraction_numerical': 0.0060790273556231, 'mean_word_length': 1.8053977272727273, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4628325', 'n_tokens_mistral': 646, 'n_tokens_neox': 586, 'n_words': 131}