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

acquaintsoft logo
Acquaint Softtech

Hire Laravel developers with AI expertise at $20/hr. Get started in 48 hours.

Visit Acquaint Softtech

The latest

View all →
A simple form builder that stays out of your way image

A simple form builder that stays out of your way

Read article
Laravel AI: Trace Agent Runs With Lifecycle Events image

Laravel AI: Trace Agent Runs With Lifecycle Events

Read article
Laravel AI: Get Raw HTTP Responses and Rate Limits image

Laravel AI: Get Raw HTTP Responses and Rate Limits

Read article
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article