koderhut/onelog-bundle
Symfony bundle that integrates OneLogin's PHP SAML toolkit, adding SAML 2.0 service-provider authentication, configurable identity providers, attribute mapping, and firewall-based single sign-on to Symfony applications. It simplifies SSO setup through bundle configuration.
composer.json, README.md, the bundle class, and DependencyInjection/ to find the config key and service IDs. Do not assume Laravel package discovery will register it.composer require koderhut/onelog-bundle
Register the bundle in config/bundles.php, add the documented config under config/packages/, then clear cache:
php bin/console cache:clear
DependencyInjection/. That is the release’s headline feature.stack channel with a shared handler.bin/console debug:container and debug:config to confirm what is actually registered.config/logging.php:
'channels' => [
'onelog' => [
'driver' => 'monolog',
'handler' => \Vendor\OneLog\Handler::class,
'handler_with' => [
// constructor args from the bundle docs
],
'formatter' => \Monolog\Formatter\LineFormatter::class,
'formatter_with' => [
'format' => "[%datetime%] %channel%.%level_name%: %message% %context%\n",
],
],
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'onelog'],
],
],
Only use this if the handler is genuinely framework-agnostic and compatible with your Monolog version. Note: middleware from 1.2.0 likely will not apply on this path — if you bypass the bundle’s logger service, you lose the pipeline. In Laravel, model the same behavior with a Monolog processor or a custom handler instead.stack to write to stderr and the one-log channel; production uses a single file or a rotating handler. Add Log::withContext(['request_id' => ...]) or a Monolog processor rather than manually prefixing every message.payments, auth, jobs) but route them to the same destination via the package’s handler or Laravel’s stack channel. This preserves Log::channel('payments') ergonomics while producing one operational log.config('logging.channels.onelog'). Keep constructor configuration out of application code.Log::spy() / Log::shouldReceive() in Laravel, or inject a test logger in Symfony. For middleware, unit-test each one in isolation (input message/context → expected output) rather than asserting on real log file contents.extra.laravel provider entry, and adding it to config/app.php will not make Symfony DI work. The new middleware layer increases the surface that is Symfony-wired, not decreases it — do not assume the middleware pipeline is reachable from a bare Monolog handler.JsonFormatter/LineFormatter can throw, emit {}, or leak properties. Always return scalars/arrays from middleware.RotatingFileHandler, logrotate, or an external shipper.cache:clear after changing bundle config — including after adding middleware. In Laravel, run php artisan config:clear or config:cache after editing config/logging.php.bin/console debug:container --tag=monolog.logger and debug:config in Symfony to confirm middleware and handler wiring; use php artisan about / config('logging') in Laravel. Check the actual namespace and class names in the repo; old bundles often differ from the package name.single or stack channel already does this. Adopt this package only if it provides a specific handler/formatter/middleware behavior you cannot reproduce in a short custom channel or processor.How can I help you explore Laravel packages today?