danmatthews / laravel-pail

Easily delve into your Laravel application's log files directly from the console. 🪣

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo Laravel Pail

Build Status Total Downloads Latest Stable Version License

Introduction

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.

Installation

Requires PHP 8.2+ with PCNTL extension.

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

Usage

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

Filtering logs

--filter

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"

--message

You may also want to filter logs only by their message, using the --message option:

php artisan pail --message="User created"

--level

You may also want to filter logs by their level, using the --level option:

php artisan pail --level=error

--user

To filter logs by the authenticated user, the one that triggered the request, you can use the --user option:

php artisan pail --user=1

Contributing

Thank you for considering contributing to Laravel Pail! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

License

Laravel Pail is open-sourced software licensed under the MIT license.

About

Easily delve into your Laravel application's log files directly from the console. 🪣

License:MIT License


Languages

Language:PHP 100.0%