Pail is an experimental package (or, who knows, perhaps a future Laravel feature?) designed with a single goal in mind: to provide an effortless way to tail logs in our Laravel applications.
Difference from other log tailing packages:
- π A user-friendly, sleek CLI interface.
- βοΈ Compatibility with any log driver. You don't need to use
app.log
orlaravel.log
. Whether you're integrated with Sentry or Bugsnag, Pail is crafted to work alongside. - π Filter logs by the authenticated user. Yes, you read it right. Pail can filter logs by the authenticated user, the one that triggered the request.
π§ Note: As of now, Pail is still in its proof-of-concept phase. It's an idea in the making, not yet optimized for production scenarios. Any feedback is welcome!
Installation
Requires PHP 8.2+
Get started with Pail by installing the package via Composer:
composer require nunomaduro/pail:dev-main
Usage
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
To filter logs by its content, use the --filter
option:
php artisan pail --filter="Illuminate\Database"
To filter logs by the authenticated user, the one that triggered the request, use the --user
option:
php artisan pail --user=1
License
Pail was created by Nuno Maduro under the MIT license.