News

Laravel Pail - The easiest way to tail your log files

Published Updated
Laravel Pail - The easiest way to tail your log files image

Laravel Pail is a package that allows you to easily dive in and tail your application's log files. Pail is designed to work with any log driver, be super easy to remember, and provide a set of useful filters to help you quickly find what you're looking for.

Installing Laravel Pail

Installation is as easy as requiring the package from Composer:

composer require laravel/pail

Then start it to begin tailing your logs:

php artisan pail

Laravel Pail has some flags that allow you to filter log messages in useful ways:

Filter logs by exception type

php artisan pail --filter="QueryException"

Filter by message

php artisan pail --message="User created"

Filter by Log level

php artisan pail --level=error

You can use any of the levels: emergency, alert, critical, error, warning, notice, info, and debug.

Filter by User ID

php artisan pail --user=1

The source code is available on GitHub at laravel/pail, and you can view the full documentation on the Laravel site.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Filed in

Sponsored

laravelcloud logo
Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Visit Laravel Cloud

The latest

View all →
CPX: The Composer Package Executor for PHP image

CPX: The Composer Package Executor for PHP

Read article
Laravel AI SDK Adds Human-in-the-Loop Tool Approval image

Laravel AI SDK Adds Human-in-the-Loop Tool Approval

Read article
Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals image

Pest 5 Released With Test Impact Analysis, Agent Verification, and Evals

Read article
Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs image

Queue-SQL: Run Mass Deletes and Updates Across Parallel Queue Jobs

Read article
Blade Formatting in Laravel Pint image

Blade Formatting in Laravel Pint

Read article
Inertia DevTools Is Now on the Chrome Web Store image

Inertia DevTools Is Now on the Chrome Web Store

Read article