- What is paysera/lib-logging-extra-bundle used for?
- It is a Symfony bundle from Paysera that extends Monolog with additional logging processors and handlers. Its purpose is to enrich application log records with consistent, reusable context and to push those logs into Sentry and Graylog as part of Paysera's logging stack. In practice it saves you from writing the same Monolog wiring and context-populating code in every project.
- Does paysera/lib-logging-extra-bundle work with Laravel or only Symfony?
- It is built and documented as a Symfony bundle, so its service registration and configuration are designed around the Symfony kernel and DI container. Laravel also uses Monolog under the hood, so the underlying processors and handlers can be relevant, but the bundle itself is not a Laravel package and will not auto-register in a Laravel app. You would need to wire the equivalent Monolog configuration manually in config/logging.php if you want similar behaviour.
- How do I install paysera/lib-logging-extra-bundle with Composer?
- Install it with Composer using the package name paysera/lib-logging-extra-bundle. In a Symfony application using Symfony Flex, the bundle recipe typically registers it automatically; otherwise you enable it in config/bundles.php. Check the repository README for the exact version constraint and any required companion packages.
- Which PHP and framework versions does this bundle support?
- The authoritative source is the composer.json in the repository, which lists the required PHP version and Symfony component constraints. Because it is a Symfony bundle, major Symfony releases can change compatibility, so pin a version range that matches your framework version. Review the tagged releases before upgrading Symfony or PHP.
- How does it integrate Monolog with Sentry and Graylog?
- The bundle adds logging processors that attach extra context to Monolog records and handlers that forward those records to Sentry and Graylog. That means you keep using Monolog as your single logging abstraction while the bundle handles the enrichment and transport details. The exact handler and processor names are documented in the README.
- Do I need a Sentry or Graylog server to use this bundle?
- The Sentry and Graylog integrations obviously require a reachable Sentry project or Graylog input to send data to. If you only need the Monolog context processors, you can usually leave the remote transports disabled in configuration. Start with a local or staging endpoint so you can verify the payloads before pointing at production.
- How do I configure paysera/lib-logging-extra-bundle?
- Configuration lives in your Symfony config files, typically a dedicated file under config/packages, with keys for the Sentry and Graylog transports and any processors you want enabled. The README documents the available options and their defaults. Keep environment-specific values such as DSNs, hosts, and credentials in environment variables rather than committed YAML.
- Can I use only the Monolog processors without the Sentry or Graylog handlers?
- Yes, in most setups the pieces are independent: processors enrich records and handlers decide where records go. You can enable the context processors and keep your existing handlers if you do not want to send data to Sentry or Graylog. Verify in the bundle configuration which services are conditional on the transport settings.
- Is paysera/lib-logging-extra-bundle safe to run in production?
- It is a small integration layer rather than a framework replacement, so the main production concerns are transport reliability and log volume. Network handlers to Sentry or Graylog should fail gracefully and not block requests, and you should sample or filter verbose levels if traffic is high. Always test the configuration in staging before enabling it in production.
- What are the alternatives if I want richer log context in a Laravel application?
- Laravel already supports Monolog processors and custom channels through config/logging.php, and packages such as Sentry's official Laravel SDK cover the error-tracking side. For Graylog you can add a GELF handler directly to a Monolog channel. If you want the exact Paysera behaviour, reuse its processors or replicate the context logic in your own tap class.