Plugin Directory

Changeset 3751127


Ignore:
Timestamp:
10/16/2026 09:04:47 PM (23 hours ago)
Author:
likoton
Message:

Add option to skip writing a new log row when the same level, source and message was already logged

Location:
likoton-debug-logs/trunk
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • likoton-debug-logs/trunk/assets/admin.css

    r3717902 r3751127  
    619619    }
    620620
     621    .wp-list-table tr {
     622        display:table-row;
     623    }
     624
    621625    .ldl-date-range.is-visible {
    622626        flex-direction: column;
  • likoton-debug-logs/trunk/assets/admin.js

    r3717902 r3751127  
    1111        const ajaxUrl = window.ajaxurl || (window.wp && wp.ajax && wp.ajax.settings && wp.ajax.settings.url);
    1212
    13         var SORT_KEY = 'likoton_debug_logs_sort';
    14 
    15         function saveSort(colIndex, asc) {
    16             try { sessionStorage.setItem(SORT_KEY, JSON.stringify({ col: colIndex, asc: asc })); } catch(e) {}
    17         }
    18 
    19         function loadSort() {
    20             try { var r = sessionStorage.getItem(SORT_KEY); return r ? JSON.parse(r) : null; } catch(e) { return null; }
    21         }
    22 
    23         function applySortToTable(colIndex, asc) {
    24             var $table = $('#ldl-logs-table');
    25             if (!$table.length) return;
    26             var $tbody = $table.find('tbody');
    27             var $headers = $table.find('th');
     13        var SORT_COLUMNS = ['id', 'level', 'source', 'message', 'created_at'];
     14
     15        // Sorting is done server-side (ORDER BY) and the current orderby/order is
     16        // remembered per-user on the server (like the other filters), so the hidden
     17        // fields below always already reflect the correct state on page load — no
     18        // client-side storage or "fix up after the fact" reload is needed here.
     19        function applySortIndicator() {
     20            var orderby = $('#ldl-orderby').val() || 'created_at';
     21            var order = $('#ldl-order').val() || 'desc';
     22            var colIndex = SORT_COLUMNS.indexOf(orderby);
     23            if (colIndex === -1) {
     24                colIndex = SORT_COLUMNS.length - 1;
     25            }
     26            var asc = order === 'asc';
     27            var $headers = $('#ldl-logs-table th');
    2828            $headers.removeClass('sorted-asc sorted-desc sorted-column');
    2929            $headers.eq(colIndex).addClass(asc ? 'sorted-asc' : 'sorted-desc').addClass('sorted-column');
    30             var rows = $tbody.find('tr').get();
    31             rows.sort(function (a, b) {
    32                 var A = $(a).children('td').eq(colIndex).text().toUpperCase();
    33                 var B = $(b).children('td').eq(colIndex).text().toUpperCase();
    34                 return asc ? A.localeCompare(B) : B.localeCompare(A);
    35             });
    36             $.each(rows, function (i, row) { $tbody.append(row); });
    37         }
    38 
    39         function applyDefaultDateSort() {
    40             var saved = loadSort();
    41             if (saved !== null) {
    42                 applySortToTable(saved.col, saved.asc);
    43             } else {
    44                 var $dateHeader = $('#ldl-logs-table th.column-date');
    45                 if ($dateHeader.length) {
    46                     var colIndex = $dateHeader.index();
    47                     applySortToTable(colIndex, false);
    48                     saveSort(colIndex, false);
    49                 }
    50             }
    5130        }
    5231
    … …  
    6544                if ($newTable.length) {
    6645                    $('#ldl-logs-table').replaceWith($newTable);
    67                     applyDefaultDateSort();
     46                    applySortIndicator();
    6847                }
    6948                scrollPage = 1;
    … …  
    357336            });
    358337
     338            $settingsForm.on('change', 'select[name="likoton_debug_logs_dedup_interval"]', function () {
     339                saveSettings(showToast);
     340            });
     341
    359342            $settingsForm.on('change', '#likoton_debug_logs_dark_mode', function () {
    360343                saveSettings(function () {
    … …  
    379362            var colIndex = $(this).index();
    380363            var asc = !$(this).hasClass('sorted-asc');
    381             applySortToTable(colIndex, asc);
    382             saveSort(colIndex, asc);
     364            $('#ldl-orderby').val(SORT_COLUMNS[colIndex] || 'created_at');
     365            $('#ldl-order').val(asc ? 'asc' : 'desc');
     366            applySortIndicator();
     367            reloadTable();
    383368        });
    384369
    385         applyDefaultDateSort();
     370        applySortIndicator();
    386371
    387372        function showToast() {
    … …  
    417402        $(document).ajaxComplete(function () {
    418403            initClearSearch();
    419             applyDefaultDateSort();
     404            applySortIndicator();
    420405        });
    421406
    … …  
    469454                    source: filterValue('source'),
    470455                    last: filterValue('last') || 50,
     456                    orderby: filterValue('orderby'),
     457                    order: filterValue('order'),
    471458                    likoton_debug_logs_nonce: likotonDebugLogsData.nonce
    472459                }, function (response) {
    … …  
    515502                if ($newTable.length) {
    516503                    $('#ldl-logs-table').replaceWith($newTable);
    517                     applyDefaultDateSort();
     504                    applySortIndicator();
    518505                }
    519506            });
  • likoton-debug-logs/trunk/includes/class-likoton-debug-logs-admin.php

    r3717902 r3751127  
    3535    }
    3636
     37    /* Allowed values (in seconds) for the "don't log identical errors more often than" setting. 0 = no limit. */
     38    public static function get_dedup_intervals() {
     39        return [ 0, 10, 30, 60, 900, 1800, 3600 ];
     40    }
     41
    3742    /* Schedules */
    3843    public static function add_schedules( $schedules ) {
    … …  
    6772            : '1m';
    6873
     74        $dedup_interval = isset( $_POST['likoton_debug_logs_dedup_interval'] )
     75            ? (int) $_POST['likoton_debug_logs_dedup_interval']
     76            : 0;
     77
     78        if ( ! in_array( $dedup_interval, self::get_dedup_intervals(), true ) ) {
     79            $dedup_interval = 0;
     80        }
     81
    6982            $levels = isset( $_POST['likoton_debug_logs_enabled_levels'] )
    7083                ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['likoton_debug_logs_enabled_levels'] ) )
    7184                : [];
    72                
     85
    7386        update_option( 'likoton_debug_logs_enabled_levels', $levels );
    7487        update_option( 'likoton_debug_logs_dark_mode', $dark_mode );
    7588        update_option( 'likoton_debug_logs_capability', $capability );
    7689        update_option( 'likoton_debug_logs_retention', $retention );
     90        update_option( 'likoton_debug_logs_dedup_interval', $dedup_interval );
    7791
    7892        wp_clear_scheduled_hook( 'likoton_debug_logs_cleanup_logs' );
    … …  
    124138        }
    125139
     140        [ $orderby, $order ] = self::get_sort_args();
     141
    126142        $logs = Likoton_Debug_Logs_Installer::get_logs( [
    127143            'search'   => $search,
    … …  
    131147            'per_page' => $per_page,
    132148            'since'    => $time_windowed ? self::compute_since( $last_raw ) : '',
     149            'orderby'  => $orderby,
     150            'order'    => $order,
    133151        ] );
    134152
    … …  
    279297                : '1m';
    280298
     299            $dedup_interval = isset( $_POST['likoton_debug_logs_dedup_interval'] )
     300                ? (int) $_POST['likoton_debug_logs_dedup_interval']
     301                : 0;
     302
     303            if ( ! in_array( $dedup_interval, self::get_dedup_intervals(), true ) ) {
     304                $dedup_interval = 0;
     305            }
     306
    281307            $levels = isset( $_POST['likoton_debug_logs_enabled_levels'] )
    282308                ? array_map( 'sanitize_text_field', wp_unslash( (array) $_POST['likoton_debug_logs_enabled_levels'] ) )
    … …  
    287313            update_option( 'likoton_debug_logs_capability', $capability );
    288314            update_option( 'likoton_debug_logs_retention', $retention );
     315            update_option( 'likoton_debug_logs_dedup_interval', $dedup_interval );
    289316
    290317            $enabled_levels = $levels;
    291318        }
    292319
    293         $dark_mode  = (bool) get_option( 'likoton_debug_logs_dark_mode', 0 );
    294         $capability = get_option( 'likoton_debug_logs_capability', 'manage_options' );
    295         $retention  = get_option( 'likoton_debug_logs_retention', '1m' );
     320        $dark_mode      = (bool) get_option( 'likoton_debug_logs_dark_mode', 0 );
     321        $capability     = get_option( 'likoton_debug_logs_capability', 'manage_options' );
     322        $retention      = get_option( 'likoton_debug_logs_retention', '1m' );
     323        $dedup_interval = (int) get_option( 'likoton_debug_logs_dedup_interval', 0 );
    296324
    297325    ?>
    … …  
    350378                    </tr>
    351379
     380                    <!-- Duplicate log throttling -->
     381                    <tr>
     382                        <th scope="row"><?php esc_html_e( "Don't log identical errors more often than every:", 'likoton-debug-logs' ); ?></th>
     383                        <td>
     384                            <select name="likoton_debug_logs_dedup_interval">
     385                                <option value="0" <?php selected( $dedup_interval, 0 ); ?>><?php esc_html_e( 'No limit', 'likoton-debug-logs' ); ?></option>
     386                                <option value="10" <?php selected( $dedup_interval, 10 ); ?>><?php esc_html_e( '10 seconds', 'likoton-debug-logs' ); ?></option>
     387                                <option value="30" <?php selected( $dedup_interval, 30 ); ?>><?php esc_html_e( '30 seconds', 'likoton-debug-logs' ); ?></option>
     388                                <option value="60" <?php selected( $dedup_interval, 60 ); ?>><?php esc_html_e( '1 minute', 'likoton-debug-logs' ); ?></option>
     389                                <option value="900" <?php selected( $dedup_interval, 900 ); ?>><?php esc_html_e( '15 minutes', 'likoton-debug-logs' ); ?></option>
     390                                <option value="1800" <?php selected( $dedup_interval, 1800 ); ?>><?php echo esc_html( _x( '30 minutes', 'dedup interval', 'likoton-debug-logs' ) ); ?></option>
     391                                <option value="3600" <?php selected( $dedup_interval, 3600 ); ?>><?php echo esc_html( _x( '1 hour', 'dedup interval', 'likoton-debug-logs' ) ); ?></option>
     392                            </select>
     393                            <p class="description"><?php esc_html_e( 'Skips writing a new log row when the same level, source and message was already logged within this time window.', 'likoton-debug-logs' ); ?></p>
     394                        </td>
     395                    </tr>
     396
    352397                    <!-- Segmented Control -->
    353398                    <tr>
    … …  
    487532    }
    488533
     534    /* Sanitize the requested sort column/direction against a whitelist. */
     535    private static function get_sort_args( $default_orderby = 'created_at', $default_order = 'desc' ) {
     536        $allowed_orderby = [ 'id', 'level', 'source', 'message', 'created_at' ];
     537
     538        if ( ! in_array( $default_orderby, $allowed_orderby, true ) ) {
     539            $default_orderby = 'created_at';
     540        }
     541
     542        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only sort preference, no state change
     543        $orderby = isset( $_GET['orderby'] ) ? sanitize_key( wp_unslash( $_GET['orderby'] ) ) : $default_orderby;
     544        // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only sort preference, no state change
     545        $order = isset( $_GET['order'] ) ? sanitize_key( wp_unslash( $_GET['order'] ) ) : $default_order;
     546
     547        if ( ! in_array( $orderby, $allowed_orderby, true ) ) {
     548            $orderby = 'created_at';
     549        }
     550
     551        $order = ( 'asc' === strtolower( $order ) ) ? 'ASC' : 'DESC';
     552
     553        return [ $orderby, $order ];
     554    }
     555
    489556    /* Format UTC date to local WordPress time */
    490557    public static function format_local_date( $utc_string ) {
    … …  
    602669            // phpcs:enable WordPress.Security.NonceVerification.Recommended
    603670
     671            [ $remembered_orderby, $remembered_order ] = self::get_sort_args();
     672
    604673            // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- read-only flag, no state change itself
    605674            $is_auto_refresh = isset( $_GET['auto_refresh'] );
    … …  
    613682                    'date_from' => $date_from,
    614683                    'date_to'   => $date_to,
     684                    'orderby'   => $remembered_orderby,
     685                    'order'     => $remembered_order,
    615686                ] );
    616687            }
    … …  
    625696            $date_from = isset( $remembered['date_from'] ) ? $remembered['date_from'] : '';
    626697            $date_to   = isset( $remembered['date_to'] )   ? $remembered['date_to']   : '';
     698
     699            $remembered_orderby = isset( $remembered['orderby'] ) ? $remembered['orderby'] : 'created_at';
     700            $remembered_order   = isset( $remembered['order'] )   ? $remembered['order']   : 'desc';
    627701        }
    628702
    … …  
    654728        }
    655729
     730        [ $orderby, $order ] = self::get_sort_args( $remembered_orderby, $remembered_order );
     731
    656732        $logs = Likoton_Debug_Logs_Installer::get_logs( [
    657733            'search'    => $search,
    … …  
    663739            'date_to'   => $last_raw === 'range' ? $date_to : '',
    664740            'since'     => $time_windowed ? self::compute_since( $last_raw ) : '',
     741            'orderby'   => $orderby,
     742            'order'     => $order,
    665743        ] );
    666744        ?>
    667745        <form id="ldl-filters" method="get" action="<?php echo esc_url( admin_url( 'admin.php' ) ); ?>">
    668746            <input type="hidden" name="page" value="likoton-debug-logs-logs" />
     747            <input type="hidden" name="orderby" id="ldl-orderby" value="<?php echo esc_attr( $orderby ); ?>" />
     748            <input type="hidden" name="order" id="ldl-order" value="<?php echo esc_attr( strtolower( $order ) ); ?>" />
    669749
    670750            <div class="ldl-filters">
    … …  
    735815            </div>
    736816
     817            <?php
     818            $sort_class = function ( $column ) use ( $orderby, $order ) {
     819                if ( $column !== $orderby ) {
     820                    return '';
     821                }
     822                return ' sorted-column ' . ( 'ASC' === $order ? 'sorted-asc' : 'sorted-desc' );
     823            };
     824            ?>
    737825            <div class="ldl-logs-wrapper">
    738826                <table id="ldl-logs-table" class="wp-list-table widefat fixed striped ldl-logs">
    739827                    <thead>
    740828                    <tr>
    741                         <th class="column-id">ID</th>
    742                         <th class="column-level"><?php esc_html_e( 'Level', 'likoton-debug-logs' ); ?></th>
    743                         <th class="column-source"><?php esc_html_e( 'Source', 'likoton-debug-logs' ); ?></th>
    744                         <th class="column-message"><?php esc_html_e( 'Message', 'likoton-debug-logs' ); ?></th>
    745                         <th class="column-date"><?php esc_html_e( 'Date', 'likoton-debug-logs' ); ?></th>
     829                        <th class="column-id<?php echo esc_attr( $sort_class( 'id' ) ); ?>">ID</th>
     830                        <th class="column-level<?php echo esc_attr( $sort_class( 'level' ) ); ?>"><?php esc_html_e( 'Level', 'likoton-debug-logs' ); ?></th>
     831                        <th class="column-source<?php echo esc_attr( $sort_class( 'source' ) ); ?>"><?php esc_html_e( 'Source', 'likoton-debug-logs' ); ?></th>
     832                        <th class="column-message<?php echo esc_attr( $sort_class( 'message' ) ); ?>"><?php esc_html_e( 'Message', 'likoton-debug-logs' ); ?></th>
     833                        <th class="column-date<?php echo esc_attr( $sort_class( 'created_at' ) ); ?>"><?php esc_html_e( 'Date', 'likoton-debug-logs' ); ?></th>
    746834                    </tr>
    747835                    </thead>
  • likoton-debug-logs/trunk/includes/class-likoton-debug-logs-installer.php

    r3717902 r3751127  
    6565            ] );
    6666}
     67
     68        if ( get_option( 'likoton_debug_logs_dedup_interval', null ) === null ) {
     69            update_option( 'likoton_debug_logs_dedup_interval', 0 );
     70        }
    6771    }
    6872
    … …  
    109113            'date_to'   => '',
    110114            'since'     => '',
     115            'orderby'   => 'created_at',
     116            'order'     => 'DESC',
    111117        ];
    112118        $args = wp_parse_args( $args, $defaults );
    … …  
    122128        $since     = sanitize_text_field( $args['since'] );
    123129
     130        // Only known columns may reach the ORDER BY clause.
     131        $allowed_orderby = [ 'id', 'level', 'source', 'message', 'created_at' ];
     132        $orderby         = in_array( $args['orderby'], $allowed_orderby, true ) ? $args['orderby'] : 'created_at';
     133        $order           = strtoupper( $args['order'] ) === 'ASC' ? 'ASC' : 'DESC';
     134
    124135        // Table name is built from $wpdb->prefix + a hardcoded constant — safe to use with esc_sql.
    125136        $table = esc_sql( $wpdb->prefix . self::TABLE_NAME );
    … …  
    194205        $params[] = $offset;
    195206
     207        // $orderby is whitelisted above; add id as a stable tiebreaker for non-unique columns.
     208        $order_sql = "{$orderby} {$order}";
     209        if ( 'id' !== $orderby ) {
     210            $order_sql .= ", id {$order}";
     211        }
     212
    196213        // $table: esc_sql( $wpdb->prefix . CONSTANT ) — safe.
    197214        // $levels_in: esc_sql() applied to each element individually — safe.
    198215        // $where_extra: literal SQL with %s/%d placeholders only — safe.
     216        // $order_sql: built only from the whitelisted $orderby/$order above — safe.
    199217        // No intermediate variable used — PHPCS tracks variable assignment as unsafe.
    200         return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$table}` WHERE level IN ( {$levels_in} ){$where_extra} ORDER BY id DESC LIMIT %d OFFSET %d", $params ) );
     218        return $wpdb->get_results( $wpdb->prepare( "SELECT * FROM `{$table}` WHERE level IN ( {$levels_in} ){$where_extra} ORDER BY {$order_sql} LIMIT %d OFFSET %d", $params ) );
    201219    }
    202220    // phpcs:enable WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber, PluginCheck.Security.DirectDB.UnescapedDBParameter
  • likoton-debug-logs/trunk/includes/class-likoton-debug-logs-logger.php

    r3647996 r3751127  
    6060                $level = 'info';
    6161            }
     62        }
     63
     64        $dedup_interval = (int) get_option( 'likoton_debug_logs_dedup_interval', 0 );
     65
     66        if ( $dedup_interval > 0 ) {
     67            // Transients live in wp_options (or an external object cache), never in the
     68            // (potentially huge) logs table, so this check stays cheap regardless of log volume.
     69            $dedup_key = 'ldl_dedup_' . md5( $level . '|' . $source . '|' . $message );
     70
     71            if ( false !== get_transient( $dedup_key ) ) {
     72                return;
     73            }
     74
     75            set_transient( $dedup_key, 1, $dedup_interval );
    6276        }
    6377
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-cs_CZ.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 měsíc"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Neprotokolovat stejnou chybu častěji než jednou za:"
     157
     158msgid "No limit"
     159msgstr "Bez omezení"
     160
     161msgid "10 seconds"
     162msgstr "10 sekund"
     163
     164msgid "30 seconds"
     165msgstr "30 sekund"
     166
     167msgid "1 minute"
     168msgstr "1 minuta"
     169
     170msgid "15 minutes"
     171msgstr "15 minut"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 min"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 hod."
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Přeskočí zápis nového záznamu, pokud stejná úroveň, zdroj a zpráva už byly zaznamenány v tomto časovém okně."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrátor (plný přístup)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-de_DE.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 Monat"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Identische Fehler nicht öfter protokollieren als alle:"
     157
     158msgid "No limit"
     159msgstr "Kein Limit"
     160
     161msgid "10 seconds"
     162msgstr "10 Sekunden"
     163
     164msgid "30 seconds"
     165msgstr "30 Sekunden"
     166
     167msgid "1 minute"
     168msgstr "1 Minute"
     169
     170msgid "15 minutes"
     171msgstr "15 Minuten"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 Min."
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 Std."
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Überspringt das Schreiben eines neuen Log-Eintrags, wenn derselbe Level, dieselbe Quelle und dieselbe Nachricht innerhalb dieses Zeitfensters bereits protokolliert wurden."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrator (voller Zugriff)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-en_US.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 month"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Don't log identical errors more often than every:"
     157
     158msgid "No limit"
     159msgstr "No limit"
     160
     161msgid "10 seconds"
     162msgstr "10 seconds"
     163
     164msgid "30 seconds"
     165msgstr "30 seconds"
     166
     167msgid "1 minute"
     168msgstr "1 minute"
     169
     170msgid "15 minutes"
     171msgstr "15 minutes"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 minutes"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 hour"
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Skips writing a new log row when the same level, source and message was already logged within this time window."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrator (full access)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-es_ES.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 mes"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "No registrar errores idénticos más a menudo que cada:"
     157
     158msgid "No limit"
     159msgstr "Sin límite"
     160
     161msgid "10 seconds"
     162msgstr "10 segundos"
     163
     164msgid "30 seconds"
     165msgstr "30 segundos"
     166
     167msgid "1 minute"
     168msgstr "1 minuto"
     169
     170msgid "15 minutes"
     171msgstr "15 minutos"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 min"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 h"
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Omite escribir una nueva fila de registro cuando el mismo nivel, origen y mensaje ya se registraron dentro de esta ventana de tiempo."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrador (acceso completo)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-fr_FR.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 mois"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Ne pas enregistrer une erreur identique plus souvent que toutes les :"
     157
     158msgid "No limit"
     159msgstr "Aucune limite"
     160
     161msgid "10 seconds"
     162msgstr "10 secondes"
     163
     164msgid "30 seconds"
     165msgstr "30 secondes"
     166
     167msgid "1 minute"
     168msgstr "1 minute"
     169
     170msgid "15 minutes"
     171msgstr "15 minutes"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 min"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 h"
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "N'enregistre pas une nouvelle ligne si le même niveau, la même source et le même message ont déjà été enregistrés dans cet intervalle de temps."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrateur (accès complet)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-pl_PL.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    138138msgstr "1 miesiąc"
    139139
     140msgid "Don't log identical errors more often than every:"
     141msgstr "Nie zapisuj identycznego błędu częściej niż raz na:"
     142
     143msgid "No limit"
     144msgstr "Bez ograniczeń"
     145
     146msgid "10 seconds"
     147msgstr "10 s"
     148
     149msgid "30 seconds"
     150msgstr "30 s"
     151
     152msgid "1 minute"
     153msgstr "1 min"
     154
     155msgid "15 minutes"
     156msgstr "15 min"
     157
     158msgctxt "dedup interval"
     159msgid "30 minutes"
     160msgstr "30 min"
     161
     162msgctxt "dedup interval"
     163msgid "1 hour"
     164msgstr "1 godz."
     165
     166msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     167msgstr "Pomija zapis nowego wpisu, jeśli ten sam poziom, źródło i wiadomość zostały już zapisane w tym przedziale czasu."
     168
    140169msgid "Administrator (full access)"
    141170msgstr "Administrator (pełny dostęp)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-pt_PT.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 mês"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Não registar erros idênticos mais frequentemente do que a cada:"
     157
     158msgid "No limit"
     159msgstr "Sem limite"
     160
     161msgid "10 seconds"
     162msgstr "10 segundos"
     163
     164msgid "30 seconds"
     165msgstr "30 segundos"
     166
     167msgid "1 minute"
     168msgstr "1 minuto"
     169
     170msgid "15 minutes"
     171msgstr "15 minutos"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 min"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 h"
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Ignora o registo de uma nova entrada quando o mesmo nível, origem e mensagem já foram registados dentro desta janela de tempo."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrador (acesso total)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs-sk_SK.po

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"POT-Creation-Date: \n"
    55"PO-Revision-Date: \n"
    … …  
    153153msgstr "1 mesiac"
    154154
     155msgid "Don't log identical errors more often than every:"
     156msgstr "Nezaznamenávať rovnakú chybu častejšie ako raz za:"
     157
     158msgid "No limit"
     159msgstr "Bez obmedzenia"
     160
     161msgid "10 seconds"
     162msgstr "10 sekúnd"
     163
     164msgid "30 seconds"
     165msgstr "30 sekúnd"
     166
     167msgid "1 minute"
     168msgstr "1 minúta"
     169
     170msgid "15 minutes"
     171msgstr "15 minút"
     172
     173msgctxt "dedup interval"
     174msgid "30 minutes"
     175msgstr "30 min"
     176
     177msgctxt "dedup interval"
     178msgid "1 hour"
     179msgstr "1 hod."
     180
     181msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     182msgstr "Preskočí zápis nového záznamu, ak rovnaká úroveň, zdroj a správa už boli zaznamenané v tomto časovom okne."
     183
    155184msgid "Administrator (full access)"
    156185msgstr "Administrátor (plný prístup)"
  • likoton-debug-logs/trunk/languages/likoton-debug-logs.pot

    r3717902 r3751127  
    11msgid ""
    22msgstr ""
    3 "Project-Id-Version: LiKoToN Debug Logs 1.1.0\n"
     3"Project-Id-Version: LiKoToN Debug Logs 1.3.0\n"
    44"Content-Type: text/plain; charset=UTF-8\n"
    55"Content-Transfer-Encoding: 8bit\n"
    … …  
    199199
    200200#: includes/class-likoton-debug-logs-admin.php
     201msgid "Don't log identical errors more often than every:"
     202msgstr ""
     203
     204#: includes/class-likoton-debug-logs-admin.php
     205msgid "No limit"
     206msgstr ""
     207
     208#: includes/class-likoton-debug-logs-admin.php
     209msgid "10 seconds"
     210msgstr ""
     211
     212#: includes/class-likoton-debug-logs-admin.php
     213msgid "30 seconds"
     214msgstr ""
     215
     216#: includes/class-likoton-debug-logs-admin.php
     217msgid "1 minute"
     218msgstr ""
     219
     220#: includes/class-likoton-debug-logs-admin.php
     221msgid "15 minutes"
     222msgstr ""
     223
     224#: includes/class-likoton-debug-logs-admin.php
     225msgctxt "dedup interval"
     226msgid "30 minutes"
     227msgstr ""
     228
     229#: includes/class-likoton-debug-logs-admin.php
     230msgctxt "dedup interval"
     231msgid "1 hour"
     232msgstr ""
     233
     234#: includes/class-likoton-debug-logs-admin.php
     235msgid "Skips writing a new log row when the same level, source and message was already logged within this time window."
     236msgstr ""
     237
     238#: includes/class-likoton-debug-logs-admin.php
    201239msgid "Administrator (full access)"
    202240msgstr ""
  • likoton-debug-logs/trunk/likoton-debug-logs.php

    r3717902 r3751127  
    55 * Description: Collects and displays WordPress and PHP debug logs with filters, live view and dark mode
    66 * Author: LiKoToN
    7  * Version: 1.2.0
     7 * Version: 1.3.0
    88 * License: GPLv3
    99 * License URI: License URI: https://www.gnu.org/licenses/gpl-3.0-standalone.html
  • likoton-debug-logs/trunk/readme.txt

    r3717902 r3751127  
    44Requires at least: 6.0
    55Tested up to: 7.1
    6 Stable tag: 1.2.0
     6Stable tag: 1.3.0
    77License: GPLv3
    88License URI: https://www.gnu.org/licenses/gpl-3.0-standalone.html
    … …  
    8989---
    9090
     91## Developer API
     92
     93### Custom logs
     94```php
     95Likoton_Debug_Logs_Logger::log( 'info', 'custom_source', 'Something happened', [ 'extra' => 'data' ] );
     96
    9197## Supported log levels (PSR-3 + extended PHP levels):
    9298
    … …  
    138144## Changelog ##
    139145
     1461.3.0
     147- Add option to skip writing a new log row when the same level, source and message was already logged
     148
    1401491.2.0
    141150- A date range selection filter has been added
Note: See TracChangeset for help on using the changeset viewer.