Skip to main content

Include more debug-log history in the Support Mode diagnostic snapshot

Premium Beginner

When an admin clicks “Send diagnostic log to Benecaster support”, Benecaster bundles the most recent log entries into a compressed snapshot and sends it to the license server. The default cap is 200 entries. If your add-on emits a high volume of verbose log lines under Support Mode, those 200 entries may only cover a short window — raise the cap to ensure the snapshot includes enough history to be useful. Values less than 1 are ignored; the sender falls back to the default.

When to Use This

When your add-on emits a high volume of verbose log entries during Support Mode — for example during a feed-sync run, a batch transcription job, or a migration import — the default 200-entry limit may not capture enough history. If the entries most relevant to a bug report were written hours or days before the snapshot is sent, they may be pushed out of the window by more recent activity.

Implementation

Hook the benecaster_support_mode_log_limit filter and return a higher integer. The default is 200. Filter values less than 1 are ignored — the sender falls back to the default.

Notes

The snapshot is gzipped before being POSTed to the license server, so payload size scales roughly with the number of entries but is not a direct 1:1 byte relationship with raw log rows. Gzip handles repetitive log line patterns well. That said, verify with the Benecaster support team before pushing the limit well past a few thousand entries, as unusually large snapshots may affect processing time on the server side.

Related

Code

<?php
add_filter(
    'benecaster_support_mode_log_limit',
    static fn() => 500
);

View on GitHub →

Hooks Used

Need this built rather than just documented? See our services →