Download the PHP package mafin/simple-logger without Composer
On this page you can find all versions of the php package mafin/simple-logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mafin/simple-logger
More information about mafin/simple-logger
Files in mafin/simple-logger
Package simple-logger
Short Description A simple PSR-3 compliant logging utility for PHP.
License MIT
Informations about the package simple-logger
Simple Logger
A simple, lightweight, and extensible PSR-3 compliant logging library for PHP 8.4+, built with SOLID principles and Dependency Injection support.
Features
- โ PSR-3 Compliant - Fully implements PSR-3 LoggerInterface
- ๐๏ธ SOLID Architecture - Clean separation of concerns with interfaces
- ๐ Dependency Injection - Easily extensible with custom writers and formatters
- ๐ Thread-Safe - File locking for concurrent writes
- ๐ฏ Context Interpolation - Replace placeholders with context values
- ๐ฆ Zero Dependencies - Only requires
psr/log - โจ Type-Safe - Full PHP 8.3+ type declarations
- ๐งช Well Tested - 100% test coverage with PHPUnit
- ๐ Static Analysis - PHPStan level max compliant
Installation
Install via Composer:
Requirements
- PHP 8.4 or higher
- psr/log ^3.0
Quick Start
Basic Usage
Context Interpolation
Dependency Injection
Custom Writer
Implement your own log writer (database, API, etc.):
Custom Formatter
Supported Log Levels
All PSR-3 log levels are supported:
emergency- System is unusablealert- Action must be taken immediatelycritical- Critical conditionserror- Error conditionswarning- Warning conditionsnotice- Normal but significant conditioninfo- Informational messagesdebug- Debug-level messages
Architecture
The library follows SOLID principles with clean separation:
Development
Running Tests
Code Style Check
Static Analysis
All Checks
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
Credits
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.