switon / log
Structured logging with log routing for Switon Framework
v1.0.0
2026-05-09 16:42 UTC
Requires
- php: >=8.3
- psr/event-dispatcher: ^1.0
- psr/log: ^2.0
- switon/core: ^1.0
- switon/event: ^1.0
Requires (Dev)
- phpunit/phpunit: ^12.0
- switon/testing: ^1.0
README
Structured logging and log routing for Switon Framework.
Installation
composer require switon/log
Requirements: PHP 8.3+
Quick Start
use Psr\Log\LoggerInterface; use Switon\Core\Attribute\Autowired; class UserService { #[Autowired] protected LoggerInterface $logger; public function login(int $userId): void { $this->logger->info('User logged in', ['user_id' => $userId]); } }
Docs: https://docs.switon.dev/latest/log
License
MIT.