Download the PHP package mellivora/logger-factory without Composer
On this page you can find all versions of the php package mellivora/logger-factory. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mellivora/logger-factory
More information about mellivora/logger-factory
Files in mellivora/logger-factory
Package logger-factory
Short Description A modern logger factory library based on Monolog for PHP 8.3+, with seamless Laravel integration
License MIT
Homepage https://github.com/zhouyl/mellivora-logger-factory
Informations about the package logger-factory
Mellivora Logger Factory
A modern logging factory library based on Monolog, designed for PHP 8.3+, providing powerful logging management capabilities and seamless Laravel framework integration.
π§ͺ High Quality Assurance: Features 88.82% test coverage with 144 test methods and 367 assertions, ensuring code quality and stability.
π Stable Release: Current version is 2.0.0, a stable release ready for production use. This version has been thoroughly tested with 87.28% test coverage and enterprise-grade quality assurance.
π€ AI-Driven Development: This project's refactoring and testing improvements were completed entirely by Augment intelligent coding AI tool, demonstrating AI's powerful capabilities in modern software development.
π Table of Contents
- β¨ Key Features
- π System Requirements
- π Installation
- π Usage
- π§ Laravel Integration
- π§ͺ Testing
- β οΈ Version Notes
- π€ Contributing
- π Support
- π License
- π Acknowledgments
β¨ Key Features
π Modern PHP 8.3+ Features
- Strict Type Declarations: Comprehensive use of
declare(strict_types=1)
and typed properties - Constructor Property Promotion: Concise constructor syntax
- Readonly Properties: Using
readonly
keyword to protect important properties - Match Expressions: Replacing traditional switch statements with safer pattern matching
- Union Types: Support for flexible type definitions like
int|Level|string
π― Core Functionality
- Multi-Channel Log Management: Support for separating log channels by functional modules
- Rich Processors: Built-in performance profiling, memory monitoring, web request processors
- Flexible Formatting: Support for JSON, HTML, custom formats and multiple output formats
- Smart Rotation: Automatic log file rotation by date and file size
- Exception Enhancement: Automatic extraction and structured recording of detailed exception information
- Filter Support: Custom log filtering logic
π§ Laravel Integration
- Zero Configuration: Automatic service discovery and registration
- Facade Support:
MLog
facade for convenient access - Helper Functions:
mlog()
,mlog_with()
,mlog_debug()
etc. - Middleware Support: Built-in request logging middleware
- Artisan Commands: Testing and management commands
- Configuration Publishing: Customizable configuration files
π Advanced Features
- Performance Monitoring: Built-in execution time and memory usage tracking
- Context Enhancement: Automatic addition of request ID, user information, etc.
- Error Handling: Graceful handling of logging failures
- Caching Support: Intelligent caching for improved performance
- Security Features: Sensitive data filtering and sanitization
π System Requirements
- PHP: 8.3 or higher
- Monolog: ^3.0
- PSR-Log: ^3.0
- Laravel: ^10.0 | ^11.0 (optional, for Laravel integration)
Installation
Install the stable version using Composer:
Usage
Basic Usage
Laravel Integration
For complete Laravel integration guide, see Laravel Documentation.
Advanced Configuration
π§ Laravel Integration
Installation
-
Install the package:
- Publish configuration (optional):
Configuration
Edit config/mellivora-logger.php
:
Usage Examples
π§ͺ Testing
Running Tests
Test Coverage
Current test coverage: 88.82%
- Total Tests: 144
- Assertions: 367
- Files Covered: 30
- Lines Covered: 1,234 / 1,389
For detailed testing information, see Testing Documentation.
β οΈ Version Notes
Alpha Version (2.0.0-alpha)
This is a pre-release version with the following characteristics:
β Completed Features
- Core Functionality: All core features implemented and tested
- High Quality: 88.82% test coverage ensuring code quality
- Complete Documentation: Comprehensive usage documentation and examples
- Production Ready: Although alpha, quality meets production standards
π― Usage Recommendations
- New Projects: Recommended for use, feature-complete and stable
- Testing Environment: Suitable for evaluation and validation in test environments
- Production Environment: Recommended to conduct thorough testing before production deployment
- Legacy Versions: Not recommended to upgrade from legacy versions due to significant architectural differences
Breaking Changes from 1.x
- PHP Version: Minimum requirement upgraded to PHP 8.3+
- Function Names: Simplified from
mellivora_log()
tomlog()
- Facade Name: Changed from
MellivoraLogger
toMLog
- Architecture: Complete rewrite with modern PHP features
- Dependencies: Updated to Monolog 3.x and modern packages
π€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
π Support
- Documentation: Complete Documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Monolog: The excellent logging library that powers this factory
- Laravel: For the outstanding framework integration support
- Symfony: For the powerful component ecosystem
- PHPUnit: For the reliable testing framework
- Augment: For the AI-powered development tools that made this project possible
Languages: δΈζ
Made with β€οΈ and AI assistance