2017 © Pedro Peláez
 

library log-envelope

Laravel 5 email on error

image

yaro/log-envelope

Laravel 5 email on error

  • Thursday, June 7, 2018
  • by Cherry Pie
  • Repository
  • 3 Watchers
  • 20 Stars
  • 11,072 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 14 Versions
  • 14 % Grown

The README.md

Log Envelope

Laravel 5-9 package for logging errors to your e-mail(s), telegram, slack and database!, (*1)

Scrutinizer Code Quality Build Status Total Downloads, (*2)

Installation

You can install the package through Composer., (*3)

composer require yaro/log-envelope

You must install this service provider. Make this the very first provider in list., (*4)

// config/app.php
'providers' => [
    // make this very first provider
    // so fatal exceptions can be catchable by envelope
    Yaro\LogEnvelope\ServiceProvider::class,
    //...
];

Then publish the config and migration file of the package using artisan., (*5)

php artisan vendor:publish --provider="Yaro\LogEnvelope\ServiceProvider"

Change your Exception Handler's (/app/Exceptions/Handler.php by default) report method like this:, (*6)

//...
public function report(Exception $e)
{
    $res = parent::report($e);

    \LogEnvelope::send($e);
    //...

    return $res; 
}
//...

Change config yaro.log-envelope.php for your needs. You can choose to log your errors to your database or send them to your email/telegram/slack. Emails are preferable, cuz they contains more debug information, such as traceback., (*7)

There is a censored_fields option which will change any fields value to ***** if it is named in this array. For example by default it will change values for fields called password to *****., (*8)

Also there is force_config option, where you can define which configs to override for LogEnvelope execution. E.g., if you using some smtp for mail sending and queue it, you can change configs to send LogEnvelope emails immediately and not via smtp:, (*9)

'force_config' => [
    'mail.driver' => 'sendmail',
    'queue.default' => 'sync',
],

TODO

  • highlight traceback in emails
  • page with logs from database

Results

Something like this with other info for debugging., (*10)


Email:, (*11)

results, (*12)


Slack:, (*13)

results, (*14)


Telegram:, (*15)

results, (*16)

License

The MIT License (MIT). Please see LICENSE for more information., (*17)

The Versions

07/06 2018

dev-master

9999999-dev

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

07/06 2018

1.4.2

1.4.2.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

01/06 2018

1.4.1

1.4.1.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

30/05 2018

1.4.0

1.4.0.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

14/11 2017

1.3.2

1.3.2.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

16/07 2017

dev-L5

dev-L5

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

16/07 2017

1.3.1

1.3.1.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

26/06 2017

dev-scrutinizer-patch-1

dev-scrutinizer-patch-1

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

18/06 2017

1.3.0

1.3.0.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

18/06 2017

1.2.2

1.2.2.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

08/02 2017

1.2.1

1.2.1.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

25/03 2016

1.2.0

1.2.0.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

29/09 2015

1.1.0

1.1.0.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error

18/08 2015

1.0.0

1.0.0.0

Laravel 5 email on error

  Sources   Download

MIT

The Requires

 

laravel log error mail on error