Skip to content

switon-php/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Switon Log Package

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.

About

PSR-3 logging with automatic categories, structured context, and category-aware level filtering for Switon Framework

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors