2017 © Pedro Peláez
 

library laravel-loggable

it can generate entities by arca principle

image

unisharp/laravel-loggable

it can generate entities by arca principle

  • Friday, March 17, 2017
  • by g0110280
  • Repository
  • 11 Watchers
  • 4 Stars
  • 39 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Log Writer

This package formats exceptions before they are written to laravel.log., (*1)

Installation

  1. Install via composer, (*2)

    composer require unisharp/laravel-filemanager
    
  2. Set up config/app.php, (*3)

    'providers' => [
        ...
        Unisharp\Loggable\LoggableServiceProvider::class,
    ],
    

    'aliases' => [ ... 'Loggable' => Unisharp\Loggable\Facades\Loggable::class, ],, (*4)

  3. Replace default exception reporter in App\Exceptions\Handler.php, (*5)

    public function report(Exception $e)
    {
        // parent::report($e);
        return \Loggable::report($e);
    }
    

Log display types

  • Simple log, (*6)

    404 not found. | (GET) http://your-domain/js/jquery.min.map | User ID : null | IP: 127.0.0.1
    

    Model not found. | (GET) http://your-domain/article/999 | User ID : 6 | IP: 127.0.0.1, (*7)

  • Detail log with trace and input, (*8)

    2016-11-17 19:03:46] local.DEBUG: {
        "user_id": 4,
        "ip": "::1",
        "action_trace": {
            "0": "Visited : OrderController | Action : create",
            "1": "Visited : CartController  | Action : count | Type : Ajax",
            "2": "Visited : CartController  | Action : show",
            "3": "Visited : CartController  | Action : count | Type : Ajax",
            "4": "Visited : OrderController | Action : create",
            "5": "Visited : CartController  | Action : count | Type : Ajax",
            "6": "Visited : OrderController | Action : store",
            "FormRequest failed": {
                "receiver_name": "",
                "receiver_phone": "",
                "note": "",
                "_token": "Mvi43arsvzrqH5RuzQVPl0GdU2xVwE7FO79Lxw1A"
            }
        }
    }  
    

Handled exceptions

  • Detail log :
    • Form request error
  • Simple log :
    • TokenMismatchException
    • ModelNotFoundException
    • NotFoundHttpException
    • HttpException
  • Both simple log and original stack trace will be written when other exceptions occurs.

The Versions

17/03 2017

dev-master

9999999-dev

it can generate entities by arca principle

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel api data