Search Logs
Real-time tail, search and filter of server log files, including rotated and gzipped archives.
Version 2.3.2 · Bundled with the core · requires PHP 7.4+ Tail, search and filter server log files in real time.
Search Logs is a real-time log viewer for the whole server: pick any of the 38 pre-configured logs (Apache, cPanel, Exim, MySQL/MariaDB, system, …), tail it live, filter it with one or two search terms, and — in deep search mode — dig through rotated and gzipped archives. You can add your own log paths. The Common cases tab runs ready-made investigations: mail that disappears, a refused login, a 500 error, a blocked IP, …
It is the free extension that comes with the core, and the plugin's default landing page (Options → Settings → General → Landing page).
The screens follow the plugin's language (Options → Settings → General → Language: Automatic, English or French). The names of the logs stay as they are written in the list. This page keeps the English names of the controls.
Search tab

Toolbar
| Control | Behavior |
|---|---|
| Log file | Dropdown of every configured log that can be read on this server, with its path and current size. |
| Search | Primary filter — case-insensitive substring match (not regex). Matches are highlighted in the output. It runs as you type from 2 characters; press Enter to search a single character. Any character works, &, <, > and quotes included (handy for URLs and query strings). |
| Narrow | Optional second filter — a line must contain both terms. The narrow term is case-sensitive, and so is its highlight. Great for error + a specific domain. |
| Deep search | Off (default): only the live file is searched. On: the whole rotation family is traversed — numeric and dated siblings alike (access_log.1, access_log.2.gz, exim_mainlog-20260719.gz, …; up to 30 files), decompressing .gz archives. Heavier — uses CPU and disk. |
| Live | The feed is live: new lines stream in continuously (a cheap cursor-delta poll every second — only the new bytes are read), and it pauses by itself while the browser tab is hidden. The pulsing dot shows the feed is running; click to pause while reading (Paused: resume), click again to resume (it catches up immediately). Suspended while Deep search is on (Live off: deep search). After three failed reads in a row the feed stops and the button reads Stopped: retry. |
An address can open the tab already set up, handy in a ticket: toolbox.php?action=search-logs/search&path=<a log from the list>&q=<term>&deep=1 (deep=1 only counts with a valid path).
The viewer
A terminal-style panel (dark background, 500 px, scrollable):
- Infinite scroll — scrolling to the top loads older lines, right above the first line shown. Up to 2 000 lines are kept on screen; the rest is trimmed, and scrolling back continues exactly where the trim happened.
- “N new lines ↓” badge — appears when new content arrives while you're scrolled up. Once older lines pushed the newest ones off the screen, it reads Back to the newest lines ↓. A burst larger than one read of the live feed (thousands of lines at once, or a browser tab hidden for a long while) reloads the newest lines instead of replaying them all.
- Explicit empty states — an empty log reads Log is empty.; a search reads No match yet for "…": searching… while it reads, No match for "…" in the part read once it stopped before the start of the log, and No match found for "…". only once the whole log (or family) was read. With no log configured, or no log that can be read, the tab says so, with a link to Configuration.
- Errors are shown above the viewer: a log deleted or moved, no disk space left to decompress an archive, an expired session. If the log was rotated under the viewer, it simply starts again from the newest lines. Notices have their own place: an archive larger than 2 GB once decompressed (only its start is searched), a damaged archive (only what could be read), an archive left out of a deep search because it could not be decompressed.
- Lines longer than 1 MiB are truncated with a
[truncated]marker; all content is HTML-escaped.
Search limits
To keep every request snappy, a search scans in slices — 16 MiB per request on the live file, 64 MiB per request in deep mode. The scan continues by itself, slice after slice (and in deep mode file after file), as long as the top of the viewer is in view: a rare term reads the whole log (or family), a frequent one fills the viewer and waits for you. A pill over the viewer reports the progress (file X/Y in deep mode · size scanned · matches) with Stop; once stopped or waiting (Search paused), Continue — or scrolling up — reads on.
Common cases tab

Ready-made investigations for what clients report most.
- Pick a case: a click anywhere on its card.
- Type what the ticket gives you (an address, an IP, a domain). A value typed in one case fills the next case's empty field when it fits.
- Choose the period: last 24 hours, last 7 days (default), last 30 days, or as far back as the logs go.
- Press Analyze.
The page's address then names the case, what was typed and the period. A reload, or the link pasted in a ticket, runs it again.
The result reads like a diagnosis, in this order:
- What was asked: the case, what was typed, the period, the time the run took. Every time is written one way (
2026-11-10 14:36:17), in the server's zone, whatever the log wrote. - Counters. A count the logs could not give is a dash, not a zero.
- What the logs point at: the likely causes (amber), then the facts (blue). Some sentences carry the command to run by hand, or a link.
- Logs read. For each log:
- the period it covers, and the time span read;
- how much was read, and why not more (the reading limit, the cap on lines found, a log younger than the period); a log with no line in the period says so, with the date of its last line; a log that could not be opened, or was left out for lack of reading budget, says so too, and an alert at the top of the result repeats it;
- its lines found;
- Open in Search, in a new tab. When the log was read whole, the link opens its rotated files too (Deep search).
- The tables.
- Their heading counts the rows ("50 of 324" when the table keeps the most active); a sentence under a cut table says which rows it shows.
- Past 20 rows, the rest waits behind Show N more rows (and Show fewer rows folds them back).
- A click on a column heading sorts it.
- An IP (except 127.0.0.1 and ::1) opens « IP blocked by the firewall » for it, in a new tab, over the default period.
- The outcome of a login is a badge: green for a success, red for a failure, amber for any other refusal, grey for a request without a valid session.
- The lines the result came from, one collapsible block per log (the 200 newest at most), the newest at the bottom, the term highlighted, with Copy and Open in Search.
- The limits that always hold, small, at the end.
| Case | You type | What it shows |
|---|---|---|
| Mail disappears | the address | Who reads the mailbox: the clients, in POP3 or IMAP and from which IP, and how many messages they deleted. The POP3 count comes from Dovecot's log. The IMAP count shows only when Dovecot writes it (deleted=, expunged=). Where each delivery went: a folder, Spam, a filter that discards (named after its cPanel page: Global Email Filters, Email Filters, a forwarder or the Default Address), a program (pipe), another server (only when Exim names the host). It warns when the mailbox is read in POP3 and IMAP at once. |
| Mail login refused | an address, an IP or a domain | The POP3, IMAP and SMTP logins: which succeed and which fail, by protocol, by IP (those lfd blocked first, then those that logged in) and by account. Refusals that are not a wrong password are counted apart: too many connections of one address from one IP, a password sent without encryption, a TLS handshake that failed (an old mail program). Blocks of those IPs: by lfd (rule, length, port, when the block ends) and by cPHulk. |
| Mail not received or bounced | the recipient (and the sender, optional) | Each message for the address: delivered (into the mailbox, Spam, a program, forwarded, to another server), discarded (and by which cPanel page), deferred, failed, or still waiting in the queue. Refused before it was received: for good, or for later (greylisting). A refusal after the message was sent (a spam score, malware) is found in exim_rejectlog, through the Envelope-to: line Exim writes under the refusal. What the reasons point at: a full mailbox, the domain's hourly sending limit, a blocklist, SPF/DKIM/DMARC, an unknown address, a server that cannot be reached. An Exim id opens every line of its message in Search. |
| Who is sending mail? | a cPanel account, a domain or an address | What it sent: messages, recipients, the share that failed or was deferred, how often cPanel's hourly limit stopped it, its busiest hour. Where the messages came from: a mailbox logged in with its password, a script's folder (PHP mail()), a cron job's output, a local program. Each mailbox's IPs: one address used from many IPs is likely a stolen password. What the refusals point at: a blocklist, SPF/DKIM/DMARC, unknown recipients. It reads exim_mainlog only. For an account or a domain, a message sent with a mailbox's password counts when it goes to another server (cPanel's « Sender identification »), or when its login is at the domain. |
| 500 errors on a site | the domain (or a URL) or the client's IP | The 5xx answers, by status, URL and IP. The error Apache or Nginx wrote with each one: the line of the same client, two seconds apart at most. It finds the cause even when the error names no site: an .htaccess of the main domain, a PHP fatal error. What the codes point at: 503 when PHP does not answer, 508 for CloudLinux's limit of simultaneous requests, a rewrite loop, a CloudLinux refusal. The server's own limits, said apart: MaxRequestWorkers reached, a process that crashed. When the site's domlogs are not in the list: the result says so, and, for a domain, two links fill the Configuration tab's form to add them. The counters of 5xx are dashes only when no access log was read (neither Apache's, nor Nginx's, nor a domlog). |
| ModSecurity blocked a site or a visitor | the domain, a URL of the site, or the visitor's IP | The requests ModSecurity refused, in Apache's and Nginx's error logs: by rule (its message, how often, the last time, a URL it refused), by URL and by IP. With OWASP CRS, the 403 comes from rule 949110 when the scores add up: the warning rules of the same request are listed, they are the ones to look at. Whether lfd then blocked the IP for the whole server (LF_MODSEC, LF_APACHE_403), and until when. To lift a rule for one site: the SecRuleRemoveById line, the domain's include file and the rebuild command. |
| IP blocked by the firewall | the IP | The blocks of the IP, by lfd and by cPHulk: rule, length and port, and when each ends (Until …, Ended …, Until removed by hand). One hint per rule seen: an old password on a device, too many connections, a port scan, ModSecurity, … The logins from it, by service and by account, in mail, SSH, cPanel, Webmail and WHM (API included). A refused SMTP command is counted apart. When one account makes up at least 80 % of at least three failures and a login succeeded, a note says to update the password saved on the device (with no success at all, it is treated as an attack). Countries blocked whole (CC_DENY) are named. The commands to check or lift a block by hand (csf -g, csf -tr, csf -dr) close the result. |
| WHM, cPanel and SSH logins | an account (root, a cPanel user, a Webmail address) or an IP | Who logged in, from where and how: the sign-in form, the API, an SSH key (with its fingerprint), a password. What failed. Counted apart: API calls refused (a tool with an old API token), requests without a valid session token (sent back to the sign-in form), sessions opened on the server itself, a « Log in as » by root. Blocks by cPHulk of the account or the IP. |
| Cron job did not run | a cPanel account, or root | Each command: how many times it ran, its first and last run, its usual interval and the runs missed; a job that stopped comes first, in amber. The crontab's changes (by the user, or by root through cPanel), crond's errors (ORPHAN, ERROR, MAIL, BAD FILE MODE) and the runs it skipped, when crond itself was stopped, and the jobs' output mails (from exim_mainlog, optional). |
How a case reads:
-
Only the live files, from their newest line back to the start of the period, and only logs of the list (Configuration tab). A run reads at most 64 MB per log and 192 MB in all, shared fairly, so a small log is always read whole; it takes a few seconds.
-
A required log missing: the case is greyed, and its card says which log it needs. An optional log missing: its part of the result is left out, and the result says so.
-
Sites' requests: on cPanel, they are in each site's domlog, not in Apache's global access_log. Add
/etc/apache2/logs/domlogs/<domain>and its-ssl_logas custom logs: the 500 case's links fill the form. -
Not in any log:
- what IMAP clients delete, unless Dovecot is told to write it;
- the automatic emptying of Trash and Spam;
- whether an IP is blocked right now (
csf -g); - a cron job's schedule, and whether it worked: the log says when it started and ended;
- ModSecurity's refusals by rules that log to the audit log only (Imunify360's): search
modsec_audit.log(« Apache audit ») in the Search tab.
The result says so where it matters. Nothing is changed: no IP is unblocked, no message is touched.
Configuration tab

An address can fill the add form: toolbox.php?action=search-logs/config&add_name=<name>&add_path=<path>.
Custom logs
The first block: your own logs, then the form that adds one.
| Field | Rules |
|---|---|
| Display name | Required, max 100 chars. |
| Absolute path | Required, must start with /, max 500 chars, no .. segments or glob characters, not already in the list. |
A link of the Common cases tab can fill the form (a site's domlog to add): check it, then press Add.
Custom entries show whether their file exists (OK or Missing), can be edited inline or deleted (confirmed), and are stored in config/logs.user.json — preserved across extension updates.
Default logs
Folded at the bottom of the tab, in a compact table: the 38 shipped entries plus the paths MySQL reports, by name and path. They are read-only, and the Search tab offers each one whose file exists. Only MySQL's paths say when their file is missing: MySQL can report a log it does not write (its general log turned off). Before 2.2.0 a default log could be hidden; from 2.2.0 every one is listed again.
Shipped coverage includes:
| Family | Logs |
|---|---|
| Web servers | Apache error / access / ModSecurity audit / suPHP · Nginx error / access |
| Exim main / panic / reject · maillog (IMAP/POP) | |
| Databases | MariaDB · MySQL error · MySQL slow query (+ MySQL paths, below) |
| cPanel | error, access, stats, license, login, sessions, cPHulk, panic, queueprocd, accounting, latest backup & transporter logs |
| System | messages, secure, cron, boot, dmesg, auditd/SELinux, chkservd, lfd, dnf, yum |
| Other | BIND (named.run), Pure-FTPd, WSA |
Some entries are globs (e.g. cpbackup/*.log) — the newest matching file is used.
MySQL paths: the extension asks the local MySQL/MariaDB (SHOW VARIABLES) where its error / slow-query / general logs really are, and lists those entries too (MySQL error log, MySQL slow query log, MySQL general log). It asks at install and at each update (the core's included), and again when you press Rescan MySQL log paths, at the top of the folded block, above the table: the line beside the button gives the time of the last scan, and the block opens by itself after a scan. If MySQL does not answer, the paths found before are kept. Rescan after changing my.cnf or moving from MySQL to MariaDB.
How it reads logs (runtime)
- Navigation is byte-offset cursor-based — pagination stays stable even while the file grows. Each cursor also names its file, so a rotation between two requests is noticed and the viewer starts again from the newest lines.
- Files are read in 64 KiB chunks, backwards from the end for tail/search.
- Gzip support: archives are detected by magic bytes. Each one is decompressed once, into
var/gz-cache/of the extension, and reused while it is unchanged. A decompression must leave 1 GiB free on the disk; one archive gives at most 2 GiB of text (past that, only its start is searched, and the viewer says so); the cache stays under 4 GiB, and copies unused for an hour are removed. - Everything is enforced server-side: chunk sizes (500 lines default, 2 000 max per request), scan caps, path whitelisting (only configured logs can be read).
Data & file map
| Path | Purpose |
|---|---|
extensions/search-logs/config/logs.default.json |
The 38 shipped log definitions (overwritten on update) |
extensions/search-logs/config/logs.user.json |
Your additions (preserved, 0600) |
extensions/search-logs/var/mysql-log-paths.json |
The MySQL paths and the time of the last scan |
extensions/search-logs/var/gz-cache/ |
Decompressed archives (emptied at install and update) |
extensions/search-logs/var/logs.user.lock |
Keeps two simultaneous changes of the list from overwriting each other |
extensions/search-logs/var/install-done.json |
The version whose install steps ran last (written by the core, which runs them again after a core update) |
Remove deletes all of it. Search Logs installs nothing outside its folder: no cron, no hook (its removal also deletes the toolbox_log_* temporary files of versions before 2.0.0).