定制 error-tracker/cake-log-target 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

error-tracker/cake-log-target

Composer 安装命令:

composer require error-tracker/cake-log-target

包简介

Error logging to Error Tracker

README 文档

README

Build Status Packagist Packagist Version

Who is this for?

This is for Cake PHP developers that need to integrate their applications with Error Tracker. This extension is a log adapter for cake php to send errors and warnings direct to Error Tracker.

Installation

Install this package with composer.

composer require error-tracker/cake-log-target

Configuration

To configure the log target in your application, add the below config to your config/app.php. Whenever there is a server side error this will be added to the file log as it normally would. Additionally this will be sent to the error tracker dashboard, for easy searches, alerts and other handy tools.

/**
 * Configures logging options
 */
'Log' => [
    'debug' => [
        'className' => 'Cake\Log\Engine\FileLog',
        'path' => LOGS,
        'file' => 'debug',
        'levels' => ['notice', 'info', 'debug'],
        'url' => env('LOG_DEBUG_URL', null),
    ],
    'error' => [
        'className' => 'Cake\Log\Engine\FileLog',
        'path' => LOGS,
        'file' => 'error',
        'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
        'url' => env('LOG_DEBUG_URL', null),
    ],
    'error_tracker' => [
        'className' => 'ErrorTracker\Cake\LogTarget',
        'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
        'app_key' => 'YOUR_APP_KEY',
    ],
],

Contributing

Getting set up

Clone the repo and run composer install. Then start hacking!

Testing

All new features of bug fixes must be tested. Testing is with phpunit and can be run with the following command.

composer run-script test

Coding Standards

This library uses psr2 coding standards and squizlabs/php_codesniffer for linting. There is a composer script for this:

composer run-script lint

Pull Requests

Before creating a pull request with your changes, the pre-commit script must pass. That can be run as follows:

composer run-script pre-commit

Credits

This package is created and maintained by Practically.io

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-12-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固