mileschou/monoex

Monolog extensions
6,164 1
Install
composer require mileschou/monoex
Latest Version:v2.4.0
PHP:^8.1
License:MIT
Last Updated:Mar 13, 2026
Links: GitHub  ·  Packagist
Maintainer: MilesChou

Monoex

tests codecov Codacy Badge Latest Stable Version Total Downloads License

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\ClientInterface
  • Psr\Http\Message\RequestFactoryInterface
  • Psr\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

gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

631,580,251 9,707
laravel/framework

The Laravel Framework.

580,311,802 34,925
laravel/tinker

Powerful REPL for the Laravel framework.

489,754,436 7,444