Laravel Pail is a package that allows you to easily delve into your Laravel application's log files directly from the command line. Unlike other log tailing packages, Pail is designed to work with any log driver, including Sentry or Flare.
In addition, Pail focuses on the developer experience: it provides a sleek CLI interface, with a user-friendly design, and a set of useful filters to help you find what you're looking for.
To get started, install Pail into your project using the Composer package manager:
Note: Pail is currently in development and is not yet ready for production use.
composer require laravel/pail:1.x-dev
To start tailing logs, run the pail
command:
php artisan pail
To increase the verbosity of the output, avoiding truncation (…), and displaying the entire log line including context and exception trace, use the -v
option:
php artisan pail -v
Sometimes, you may want to filter logs by their entire content and for that, you can use the --filter
option:
php artisan pail --filter="QueryException"
You may also want to filter logs only by their message, using the --message
option:
php artisan pail --message="User created"
You may also want to filter logs by their level, using the --level
option:
php artisan pail --level=error
To filter logs by the authenticated user, the one that triggered the request, you can use the --user
option:
php artisan pail --user=1
Thank you for considering contributing to Laravel Pail! The contribution guide can be found in the Laravel documentation.
In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.
Please review our security policy on how to report security vulnerabilities.
Laravel Pail is open-sourced software licensed under the MIT license.