Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Php Logger Laravel Package

event-engine/php-logger

Event Engine Logger for PHP: a lightweight logging package designed to integrate with Event Engine applications. Provides simple logger setup for capturing and routing application events and messages in your PHP services.

View on GitHub
Deep Wiki
Context7

Event Engine Logger PHP Package

Frequently asked questions about Php Logger
How do I install Event Engine Logger in a Laravel project?
Run `composer require event-engine/php-logger` to install the package. You’ll also need `event-engine/php-engine-utils` as a dependency, which provides shared utilities like serialization. Ensure your Laravel project supports PHP 8.2 or 8.3, as PHP 8.4 is no longer supported by this package.
Does this package work with Laravel’s built-in Log facade?
No, this package is designed as an alternative to Laravel’s monolithic `Log` facade. It integrates with Event Engine’s event-driven architecture and requires a custom service provider for setup. You can still use Laravel’s logger as a fallback if needed.
What’s the impact of the new `php-engine-utils` dependency?
`php-engine-utils` adds shared abstractions like payload validation and serialization, reducing code duplication across Event Engine’s PHP ecosystem. This may introduce minor overhead but ensures consistent behavior. Verify compatibility by checking `composer.json` constraints and testing with your Laravel app.
Can I use this logger with Laravel 10 or 11?
Yes, this package is compatible with Laravel 10 and 11, provided your PHP version is 8.2 or 8.3. Laravel’s LTS support aligns with the package’s PHP version requirements, so no additional configuration is needed for these versions.
How do I configure structured logging for ELK or Datadog?
Configure the logger in `config/event-engine.php` to output structured JSON logs. Use the `EventEngineLogger` class to route logs to your preferred destination (e.g., ELK or Datadog). The package supports PSR-3 compliance, so you can extend it with custom handlers for these observability tools.
Are there performance concerns with `php-engine-utils`?
`php-engine-utils` introduces minor overhead for serialization and validation, but it’s optimized for Event Engine’s event-driven workflows. Benchmark your Laravel app to assess impact, especially in high-throughput scenarios. The trade-off is consistency across Event Engine’s PHP ecosystem.
What happens if I don’t use Event Engine’s other PHP packages?
You can still use this logger independently, but `php-engine-utils` will be required. The package abstracts shared utilities, so you won’t need other Event Engine packages unless you’re building a full event-driven system. However, some features may rely on utils for validation or serialization.
How do I test this logger in a Laravel application?
Mock the `EventEngineLogger` in your tests and verify log entries are structured correctly. Use Laravel’s `Log` facade as a fallback for edge cases. Test with both synchronous and asynchronous events to ensure the logger handles all scenarios in your event-driven workflow.
Does this package support async logging or queue-based log processing?
The package itself doesn’t include async logging, but you can integrate it with Laravel’s queue system or third-party async loggers like `monolog/monolog`. Configure the logger to write to a queue-aware handler (e.g., `AsyncProcessor`) for delayed log processing.
What are the alternatives to Event Engine Logger for Laravel?
Alternatives include Laravel’s built-in `Log` facade, Monolog (via `monolog/monolog`), or specialized packages like `spatie/laravel-logging`. Monolog offers more plugins and handlers, while Event Engine Logger is tailored for event-driven architectures and observability stacks like ELK or Datadog.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky