mothership-app/php-logs
Composer 安装命令:
composer require mothership-app/php-logs
包简介
Error logging library for Mothership.app
README 文档
README
About
Mothership PHP Logs allows you to log server-side errors to your Mothership account where you can gather and organize logs in addition to performing backups, healthchecks, and sync your devlopment box with your various environments in seconds.
Once you've signed up let's get started!
Install through composer
composer require mothership-app/php-logs
General PHP
use Mothership\Mothership; Mothership::init([ 'access_token' => 'XXXXXXXXX - YOUR KEY - XXXXXXXX', 'environment' => 'production' ]); Mothership::error($exception);
Laravel
Edit your app/Exceptions/Handler.php file with the following and you're good to go.
use Illuminate\Support\Facades\App; use Mothership\Mothership; ... /** * Render an exception into an HTTP response. * * @param \Illuminate\Http\Request $request * @param \Exception $exception * @return \Illuminate\Http\Response */ public function render($request, Exception $exception) { if ($this->shouldReport($exception)) { Mothership::init([ 'access_token' => 'XXXXXXXXX - YOUR KEY - XXXXXXXX', 'environment' => App::environment() ]); Mothership::error($exception); } parent::report($exception); }
统计信息
- 总下载量: 6.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2019-11-06