bizkit/loggable-command-bundle
bus/message handlers). Aligns with Symfony’s messaging patterns but requires abstraction for Laravel’s Illuminate\Bus or Illuminate\Queue systems.monolog/monolog), reducing friction in adoption.symfony/messenger, symfony/console) or custom Laravel command/message handler wrappers to bridge Symfony’s CommandBus/MessageBus with Laravel’s Bus/Queue.config/logging.php must be extended to support dynamic channel creation per command/job. Potential conflicts with Laravel’s default log channels (e.g., single, daily).doctrine/annotations) can replace Symfony’s annotations with minimal refactoring.CommandBus handles this; Laravel’s Bus may not).symfony/console, symfony/messenger), increasing bundle size (~1–2MB).Log::channel()) or supplement it?Command/Message interfaces?LoggableCommandBus or Queue listener be needed?telescope, laravel-debugbar)?symfony/messenger).Command class + custom trait to inject logging.ShouldQueue with a Loggable interface/trait.bizkit/loggable-command-bundle (primary)symfony/messenger (if using message handlers)symfony/console (for command support)doctrine/annotations (if using annotations; optional for PHP 8 attributes).SendEmailJob).LoggableCommand trait for Artisan commands:
use Bizkit\LoggableCommandBundle\Attribute\Loggable;
#[Loggable] class MyCommand extends Command { ... }
$job->handle(); // Wrapped to log to dedicated file
Log::channel() calls in commands/jobs with bundle attributes.exclusive_channels in bundle config).symfony/console integration (minimal changes).EventDispatcher integration.single). Solution: Use exclusive_channels to isolate loggable commands.config/packages/bizkit_loggable_command.yaml (or Laravel service provider).#[Loggable] to Artisan commands.php artisan CLI.LoggableJob trait/middleware.SendPaymentJob).exclusive_channels, handlers).README.config/logging.php to override default channels for loggable commands.tail -f for CLI log inspection.symfony/messenger transport for logs).syslog or Fluentd.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Monolog misconfiguration | No logs generated | Validate exclusive_channels and handler setup. |
| File permission issues | Logs written to wrong location | Use storage/logs/ with 0777 permissions. |
| Symfony component conflicts | Bundle fails to load | Isolate in a separate service provider. |
| High command/job volume | Disk I/O saturation | Limit loggable commands to critical paths. |
| Laravel update breaks compatibility | Bundle stops working | Pin Symfony dependencies or fork the bundle. |
#[Loggable] to a command/job.assertFileExists(storage/logs/CommandName.log)).How can I help you explore Laravel packages today?