devsquad-cockpit/php
Composer 安装命令:
composer require devsquad-cockpit/php
包简介
A Freemium package to help you tracking your project errors
README 文档
README
Cockpit is a beautiful error tracking package that will help your software team to track and fix errors.
Composer Installation
This package is compatible with PHP 7.3 or greater.
Add these lines to the composer.json file in your project root:
"repositories": [ { "type": "composer", "url": "https://devsquad.repo.repman.io" } ]
Create the auth.json file with this content in your project root:
{
"http-basic": {
"devsquad.repo.repman.io": {
"username": "1fc2d46ccf0406664c6427da36c26c3bebadd220b86ff7aed078def2ca03ebd6",
"password": "1fc2d46ccf0406664c6427da36c26c3bebadd220b86ff7aed078def2ca03ebd6"
}
}
}
Now you can install the package:
composer require devsquad-cockpit/php
Configuration
So that the cockpit can send the errors to the application you need to define this environment configuration in your .env file
COCKPIT_DOMAIN=http://fake-cockpit.app/ COCKPIT_TOKEN=project-token
Testing
You're able to send a fake error to the Cockpit as a test by running this command:
./vendor/bin/cockpit test
Set logged user
Using the function below when reporting an error, the cockpit will send the data of the logged in user according to what was returned by Closure.
Cockpit::setUser(function() { return ['name'=>'name', 'email'=>'user@email.com'...]; });
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-19
