承接 cerealkiller/error-logger-laravel-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

cerealkiller/error-logger-laravel-sdk

Composer 安装命令:

composer require cerealkiller/error-logger-laravel-sdk

包简介

Laravel SDK for ErrorLogger

README 文档

README

ErrorLogger

Laravel 7.x package for logging errors to error-logger.netlify.app

Latest Stable Version Total Downloads License

Installation

You can install the package through Composer.

composer require cerealkiller/error-logger-laravel-sdk

Then publish the config and migration file of the package using artisan.

php artisan vendor:publish --provider="ErrorLogger\ErrorLoggerServiceProvider"

And adjust config file (config/errorlogger.php) with your desired settings.

Note: by default only local environments will report errors. To modify this edit your errorlogger configuration.

Configuration variables

All that is left to do is to define env configuration variable in .env

ERRORLOGGER_API_KEY=

ERRORLOGGER_API_KEY is your profile key which authorises your account to the API.

Get API_KEY at error-logger.netlify.app

Setup

Next is to add the errorlogger driver to the logging.php file:

'channels' => [
    'errorlogger' => [
        'driver' => 'errorlogger',
    ],
],

After that you have configured the ErrorLogger channel you can add it to the stack section:

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'errorlogger'],
    ],
],

Frontend

To catch frontend errors, add this include blade directive on top of the file where you want to log errors.

@include('errorlogger::js-errorlogger-client')

Testing

Now test to see if it works, you can do this in two ways.

Option 1:
  • Run this in your terminal:
php artisan errorlogger:test
Option 2:
  • Run this code in your application to see if the exception is received by ErrorLogger.
throw new \Exception('Testing my application!');

And you are good to go! Happy coding :)

Versioning

ErrorLogger-Laravel-SDK is versioned under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backward compatibility bumps the major and resets the minor and patch.

  • New additions without breaking backward compatibility bumps the minor and resets the patch.

  • Bug fixes and misc changes bumps the patch.

  • Minor versions are not maintained individually, and you're encouraged to upgrade through to the next minor version.

Major versions are maintained individually through separate branches.

License

The ErrorLogger-Laravel-SDK package is open source software licensed under the Apache License 2.0

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固