adrianoalves/laravel-exceptionlog 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

adrianoalves/laravel-exceptionlog

Composer 安装命令:

composer require adrianoalves/laravel-exceptionlog

包简介

Simple Laravel Exception and Error Persistence Log Layer

README 文档

README

Simplest/Minimum Laravel Exception Log Persistence Layer Package

Installation

Use composer require adrianoalves/laravel-exceptionlog to install the package.

Execute php artisan migrate to create the logs database table

How to Use

Just call the following Method in your application:

try{
  // ... put your watched code here
}
catch( \Exception $exception ){
    ExceptionLog::persist( $exception, ExceptionLog\LevelMapper::LEVEL_ERROR_APPLICATION );
}

It is simple as pie :)

Log Levels

The package has a much simple mapper to organize exceptions in levels/categories.

const LEVEL_NOTICE            = 1;

    const LEVEL_WARNING           = 2;

    const LEVEL_ERROR_APPLICATION = 3;

    const LEVEL_ERROR_DATABASE    = 4;

    const LEVEL_ERROR_SERVER      = 5;

    const LEVEL_ERROR_CONSOLE     = 6;

    const LEVEL_ERROR_JOB         = 7;

    public static $mapper = [
        1 => [ 'label' => 'Notificação' ],
        2 => [ 'label' => 'Aviso' ],
        3 => [ 'label' => 'Erro: Sistema' ],
        4 => [ 'label' => 'Erro: Persistência' ],
        5 => [ 'label' => 'Erro: Servidor' ],
        6 => [ 'label' => 'Erro: Console' ],
        7 => [ 'label' => 'Erro: Execução de Job' ],
    ];

You can create and customize your own levels and dictionaries to better identify your application Exceptions.

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固