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.
The post Laravel Pail - The easiest way to tail your log files appeared first on Laravel News.
Join the Laravel Newsletter to get Laravel articles like this directly in your inbox.
0 comments:
Post a Comment
Thanks