Laravel Pail is a package that allows you to easily dive 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 (…), use the -v
option:
php artisan pail -v
For maximum verbosity and to display exception stack traces, use the -vv
option:
php artisan pail -vv
To stop tailing logs, press Ctrl+C
at any time.
You may use the --filter
option to filter logs by their type, file, message, and stack trace content:
php artisan pail --filter="QueryException"
To filter logs by only their message, you may use the --message
option:
php artisan pail --message="User created"
The --level
option may be used to filter logs by their log level:
php artisan pail --level=error
To only display logs that were written while a given user was authenticated, you may 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.