mileschou/monoex
Monoex
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.
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
637,827,751
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
413,412,504
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660
Version History
| Version | Released | PHP | License |
|---|---|---|---|
| v2.4.0 | ^8.1 | MIT | |
| v2.3.0 | ^8.1 | MIT | |
| v2.2.0 | ^8.1 | MIT | |
| v2.1.1 | ^8.1 | MIT | |
| v2.1.0 | ^8.1 | MIT | |
| v2.0.0 | ^8.1 | MIT | |
| v0.3.0 | ^7.1 | | MIT | |
| v0.2.0 | ^7.1 | | MIT | |
| v0.1.0 | ^7.1 | MIT |