2017 © Pedro Peláez
 

library laravel-log-enhancer

Make debugging easier by adding more data to your laravel logs

image

freshbitsweb/laravel-log-enhancer

Make debugging easier by adding more data to your laravel logs

  • Thursday, June 14, 2018
  • by gauravmak
  • Repository
  • 8 Watchers
  • 153 Stars
  • 4,708 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 5 Versions
  • 177 % Grown

The README.md

Latest Stable Version Total Downloads License StyleCI Buy us a tree, (*1)

Laravel Log Enhancer (Laravel 5.6 to Laravel 12.x)

Laravel logs help all of us debug issues. We value them the most in production. But, the contextual data of the request is not logged by default. We need more than just stack trace to debug the issue easily. The things like request URL, request input data, session data, etc. help us hunt down the exact cause quickly. That's what this plug-and-play Laravel package does for you :), (*2)

Before

Before, (*3)

After

After, (*4)

Requirements

PHP Laravel Package
8.2+ 12.x v2.0.0
8.2+ 11.x v1.7.0
8.1+ 10.x v1.6.0
8.0+ 9.x v1.5.0
8.0+ 9.x v1.4.0
7.3+ 8.x v1.3.0
7.2.5+ 7.x v1.2.0
<7.2.5 6.x v1.1.0
<7.1 5.x v1.0.*

Notes: - For Laravel 5.5, you may use Slack Error Notifier package., (*5)

Installation

1) Install the package by running this command in your terminal/cmd:, (*6)

composer require freshbitsweb/laravel-log-enhancer

2) Add this package's LogEnhancer class to the tap option of your log channel in config/logging.php:, (*7)

'production_stack' => [
    'driver' => 'stack',
    'tap' => [Freshbitsweb\LaravelLogEnhancer\LogEnhancer::class],
    'channels' => ['daily', 'slack'],
],

Optionally, you can import config file by running this command in your terminal/cmd:, (*8)

php artisan vendor:publish --tag=laravel-log-enhancer-config

It has following configuration settings: (bool) log_request_details => Set to *true if you wish to log request data. Reference, (*9)

  • (bool) log_input_data => Set to true if you wish to log user input data, (*10)

  • (bool) log_request_headers => Set to true if you wish to log request headers, (*11)

  • (bool) log_session_data => Set to true if you wish to log session data, (*12)

  • (bool) log_memory_usage => Set to true if you wish to log memory usage Reference, (*13)

  • (bool) log_git_data => Set to true if you wish to log git branch name, last commit message, last commit id, staged or (un)staged changes., (*14)

  • (bool) log_app_details => Set to true if you wish to log application data. It will include Laravel Version, PHP Version, Config Cached and Route Cached details., (*15)

  • (array) ignore_input_fields => If input data is being sent, you can specify the inputs from the user that should not be logged. for example, password,cc number, etc., (*16)

Lumen compatibility

We do not use Lumen in any of our projects. And this package is not tested with Lumen framework. If you are willing to use this package with Lumen, please help us by testing and making a PR to make it work. Thanks., (*17)

Authors

See also the list of contributors who participated in this project., (*18)

License

This project is licensed under the MIT License - see the LICENSE file for details, (*19)

Treeware

You're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree., (*20)

It’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to plant trees. If you contribute to our forest you’ll be creating employment for local families and restoring wildlife habitats., (*21)

You can buy trees at for our forest here offset.earth/treeware, (*22)

Read more about Treeware at treeware.earth, (*23)

Special Thanks to

The Versions

14/06 2018

dev-master

9999999-dev

Make debugging easier by adding more data to your laravel logs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gaurav Makhecha

23/05 2018

dev-analysis-zEv9RA

dev-analysis-zEv9RA

Make debugging easier by adding more data to your laravel logs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Gaurav Makhecha

29/03 2018

v1.0.2

1.0.2.0

Make debugging easier by adding more data to your laravel logs

  Sources   Download

MIT

The Requires

 

by Gaurav Makhecha

27/03 2018

v1.0.1

1.0.1.0

Make debugging easier by adding more data to your laravel logs

  Sources   Download

MIT

The Requires

 

by Gaurav Makhecha

27/03 2018

v1.0.0

1.0.0.0

Make debugging easier by adding more data to your laravel logs

  Sources   Download

MIT

The Requires

 

by Gaurav Makhecha