mileschou/monoex
最新稳定版本:v2.3.0
Composer 安装命令:
composer require mileschou/monoex
包简介
Monolog extensions
README 文档
README
Monolog extensions.
- Version 0.x Support PHP 7.1 ~ 8.0 and Laravel 5.7 ~ 9.0.
- Version 2.x Support PHP 8.1 and Laravel 10.
Use on Laravel
This package implements Package Discovery, and the following PSR-17 / PSR-18 driver must be register:
Psr\Http\Client\ClientInterfacePsr\Http\Message\RequestFactoryInterfacePsr\Http\Message\StreamFactoryInterface
Example, use laminas/laminas-diactoros and symfony/http-client:
$app->singleton(RequestFactoryInterface::class, new \Laminas\Diactoros\RequestFactory()); $app->singleton(ResponseFactoryInterface::class, new \Laminas\Diactoros\ResponseFactory()); $app->singleton(StreamFactoryInterface::class, new \Laminas\Diactoros\StreamFactory()); $app->singleton(ClientInterface::class, function($app) { return new \Symfony\Component\HttpClient\Psr18Client( null, $app->make(ResponseFactoryInterface::class), $app->make(StreamFactoryInterface::class) ); });
Finally, the logging.php config can use by new driver psr18slack:
return [ 'channels' => [ 'stack' => [ 'driver' => 'psr18slack', // same as slack driver 'url' => env('LOG_SLACK_WEBHOOK_URL'), 'username' => 'Laravel Log', 'emoji' => ':boom:', 'level' => 'critical', ], ], ];
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 4.74k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-16