Skip to content

ismoil-nosr/laravel-reqresp-logging

Repository files navigation

Laravel ReqResp Logging

Latest Version on Packagist Total Downloads GitHub Actions

This package allows you to log requests and responses from

  • Laravel Routes
  • Http Facade
  • GuzzleHttp Client via ready-to-use Middleware classes. You can also filter the values of specific keys that are might be present in request/response.

Installation

  1. You can install the package via composer:
composer require ismoil-nosr/laravel-reqresp-logging
  1. Publish config
php artisan vendor:publish --tag=reqresp-config
  1. Set .env
# REQRESP LOGGING
REQRESP_ENABLED=true
REQRESP_QUEUE_ENABLED=true
REQRESP_FILTER_REQUEST_ENABLED=true
REQRESP_FILTER_RESPONSE_ENABLED=true
REQRESP_FILTER_KEYS=password
REQRESP_LOGGER_CHANNEL=daily
REQRESP_QUEUE_NAME=logs

Usage

By default package uses daily channel.

Log to MySQL database

'database' => [
    'driver' => 'monolog',
    'handler' => MysqlLogHandler::class,
    'level' => 'debug',
]

Log Laravel routes

// Usage description here

Log HTTP Client Facade requests and responses

// Usage description here

Log Guzzle requests and responses

// Usage description here

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages