designcoda / monlogs
Monlogs 监控插件
2.12
2020-07-25 08:14 UTC
Requires
- php: >=5.3.0
README
要求
- PHP >= 7.2
- Laravel >= 5.8
描述
此插件通过 REST API 将您的 Laravel 项目的错误发送到另一个网站。发送以下信息
'message' - error message (syntax error, unexpected '}', expecting ';'),
'file' - file (absolute path),
'line' - line where error occured,
'trace' - string with trace of an error,
'user_id' - id of authored user (or null),
'url' - URL,
'site' - site domain,
'api_key' - your api key.
安装
Composer
composer require designcoda/monlogs-laravel
Laravel
- 打开 config/app.php 文件并添加提供者
DesignCoda\Monlogs\MonlogsServiceProvider::class,
- 在 config/app.php 的别名部分添加一个 Facade
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
-
获取您网站的 API 密钥
-
根据需要配置 .env 文件
MONLOGS_API_KEY= MONLOGS_API_URL=
-
运行以清除缓存
php artisan config:clear
php artisan route:clear
Laravel
- 打开 config/app.php 文件,在该文件的 providers 部分添加一行
DesignCoda\Monlogs\MonlogsServiceProvider::class,
- 在 config/app.php 文件的 aliases 部分添加一个 Facade
'Monlogs' => DesignCoda\Monlogs\MonlogsFacade::class,
-
获取您网站的 API 密钥
-
配置 .env 文件(输入您的 API 密钥)
MONLOGS_API_KEY= MONLOGS_API_URL=
-
使用命令清除缓存
php artisan config:clear
php artisan route:clear
许可证
GNU GPLv3
版权 Alexanyasha