laravel/pail
Laravel Pail lets you tail and search your Laravel app’s log messages from the command line with a polished, developer-friendly UI. Works with any log driver, including services like Sentry and Flare, and includes handy filters to quickly find what matters.
Install the package via Composer:
composer require laravel/pail --dev
No service provider registration is needed—Pail auto-registers its console commands (pail:watch, pail:history). Start tailing logs instantly with:
php artisan pail:watch
Or view recent logs (default: last 50 lines) with:
php artisan pail:history
The first use case is typically debugging an issue in development by watching logs in real time while reproducing the bug (e.g., php artisan pail:watch --level=error).
php artisan pail:watch in a split terminal alongside your app while testing API endpoints, job dispatches, or notifications.--level=debug or --context=userId:123 to narrow logs to specific scenarios (e.g., php artisan pail:watch --context=tenantId:42 --level=warn).single, daily, stack, syslog, and external drivers like Sentry/Flare—no extra config needed.php artisan pail:history in deployment pipelines to quickly surface recent exceptions when errors occur.League\OAuth2\Server\Exception\OAuthServerException).daily)—Pail handles this transparently via filemtime checks.pail:watch to other commands that strip colors or break pagination (e.g., grep). Instead, use --filter="your pattern" for safe text searches.--timeout option (e.g., --timeout=5) is useful in scripts or CI jobs where you want to stream logs briefly without infinite hanging.Log::info('Order processed', ['orderId' => 123])), you can grep only those entries: php artisan pail:watch --context=orderId:123.APP_DEBUG=true and APP_LOG_LEVEL=debug if you need full detail.How can I help you explore Laravel packages today?