<commit_before><div class="logs-content">

    {% if authorize(['admin.super']) %}
        {% set file = grav.uri.param('log') ?: 'grav' %}
        {% set verbose = grav.uri.param('verbose') == 'true' ? true : false %}
        {% set lines = grav.uri.param('lines') ?: 20 %}
        {% set logfile = grav.locator.findResource("log://" ~ file ~ '.log') %}
        {% set logs = logviewer.objectTail(logfile, lines|int, false) %}

        <div class="logs-output">

            {# example: /admin/tools/logs/file:email/verbose:true/lines:50 #}
            {# This could be changed to use query string rather than params.. just code above... #}
            <form>
                <div class="block block-select">
                    <div class="form-field">
                        <div class="form-data">
                            <select class="form-select selectized" name="log">
                                <option value="grav">Grav</option>
                                <option value="email">Email</option>
                            </select>

                            <select class="form-select selectized" name="verbose">
                                <option value="false">Essential Details</option>
                                <option value="true">Verbose Output</option>
                            </select>

                            <select class="form-select selectized" name="lines">
                                <option value="10">10 entries</option>
                                <option value="25">25 entries</option>
                                <option value="50">50 entries</option>
                                <option value="100">100 entries</option>
                                <option value="200">200 entries</option><commit_msg>use query rather than params<commit_after><div class="logs-content">

    {% if authorize(['admin.super']) %}
        {% set file = grav.uri.query('log') ?: 'grav' %}
        {% set verbose = grav.uri.query('verbose') == 'true' ? true : false %}
        {% set lines = grav.uri.query('lines') ?: 20 %}
        {% set logfile = grav.locator.findResource("log://" ~ file ~ '.log') %}
        {% set logs = logviewer.objectTail(logfile, lines|int, false) %}

        <div class="logs-output">

            <form>
                <div class="block block-select">
                    <div class="form-field">
                        <div class="form-data">
                            <select class="form-select selectized" name="log">
                                <option value="grav">Grav</option>
                                <option value="email">Email</option>
                            </select>

                            <select class="form-select selectized" name="verbose">
                                <option value="false">Essential Details</option>
                                <option value="true">Verbose Output</option>
                            </select>

                            <select class="form-select selectized" name="lines">
                                <option value="10">10 entries</option>
                                <option value="25">25 entries</option>
                                <option value="50">50 entries</option>
                                <option value="100">100 entries</option>
                                <option value="200">200 entries</option>
{'fraction_non_alphanumeric': 0.13917374743627306, 'fraction_numerical': 0.01582185760328157, 'mean_word_length': 1.3741307371349096, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, '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': '821382', 'n_tokens_mistral': 895, 'n_tokens_neox': 795, 'n_words': 173}