A FIELD GUIDE TO LARAVEL · VOLUME II · THE ECOSYSTEM
ENTRY II.34 · LOG TAILING
Pail
Laravel\Pail · Package · first recorded 6 October 2023, v1.0.0-beta.1 on Packagist
A log tail for the terminal that works with any log driver, Nightwatch, Sentry or Flare included, because it listens for log events and keeps its own temporary files under storage/pail, rather than tailing the app's log file. One command, four filters, Ctrl+C to stop.
Specification
Kind Dev-only package; a command, nothing resident
Interface Listens for MessageLogged in-process, so the configured driver does not matter
Runs on The terminal during development; needs the PCNTL extension
Installed by composer require --dev laravel/pail
Voice pail · pail -v · pail -vv
Scales by Not a concern: each open tail gets its own file in storage/pail
Range Cloud: n/a: local tool. Cloud has a Logs tab of its own
Forge, VPS: over SSH, only if dev packages and PCNTL are installed
Vapor: no. Pail switches itself off on Vapor; there is no terminal on Lambda
Neighbours
Telescope stores each entry in your database to browse at /telescope. Nightwatch records production in a hosted service, and Cloud shows an environment's logs in its dashboard. Pail keeps nothing: it listens to the logger and shows each entry as it passes, in a terminal.
Field marks
require-dev: laravel/pail
php artisan pail
storage/pail/
PCNTL in php -m
Fig. II.34.1 · One log line, tailed
Parts
1 Log call. Log::info('User {id} failed', ['id' => 1]) anywhere in the app: a request, a queued job, a command.
2 Channel stack. The configured drivers still receive the entry: single, daily, Slack, Nightwatch, Sentry, Flare.
3 Pail tap. A listener on every log event; it writes only while a tail is open, whatever driver is configured.
4 Filters. --filter on type, file, message and trace; --message; --level=error; --user=1 for one signed-in user.
5 Terminal. Each entry with its level, time and origin. -v stops truncation; -vv adds the exception stack trace.
Hidden joinery
--user matches entries written while that user was signed in, read from the auth context at write time. -v only widens the line; -vv is what shows a stack trace. PCNTL lets Ctrl+C be trapped so the tail's file is removed. Each tail is a .pail file that every app process on the machine writes to and the command reads.
Every line checked against the 13.x logging docs and laravel/pail source on 2026-10-08.
TITLE
Pail · the log, tailed live
SOURCES
laravel.com/docs/13.x/logging#tailing-log-messages-using-pail · github.com/laravel/pail · repo.packagist.org/p2/laravel/pail.json · laravel.com/cloud/docs/logs · laravel.com/forge/docs · nightwatch.laravel.com/docs · laravel.com/docs/13.x/telescope
STATUS
Verified · 2026-10-08
SHEET
II.34 of 48
REV
A · 2026-10-08
DRAWN
BS
FINISH
All faces, including the back