oihana/php-logging 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oihana/php-logging

Composer 安装命令:

composer require oihana/php-logging

包简介

The Oihana PHP Logging library

README 文档

README

Oihana PHP Logging

A lightweight, PSR-3 logging toolkit for PHP 8.4+.

Latest Version
Total Downloads
License

📚 Documentation

User guides (FR + EN), with narrative explanations and examples:

🇬🇧 English documentation 🇫🇷 Documentation française
Getting started, loggers, managers, traits, processors, enums, tips. Démarrage, loggers, managers, traits, processeurs, énumérations, astuces.

Auto-generated API reference (phpDocumentor):
👉 https://bcommebois.github.io/oihana-php-logging

🚀 Features

  • 🪵 A PSR-3 compliant, daily-file Logger with message interpolation and global error/exception hooks.
  • 🧩 A CompositeLogger that broadcasts log calls to many PSR-3 loggers (WeakMap-based auto-cleanup).
  • 🔄 A Monolog-based rotating-file manager (MonoLogManager) and a reusable LoggerManager base class.
  • 🧰 Composable logger traits — LoggerTrait, LoggerManagerTrait, DebugTrait.
  • ✨ Custom Monolog processors — emoji and symbol level decorators.
  • 🧪 Full unit-test coverage ensuring reliability and maintainability.

💡 Designed to be lightweight, testable, and compatible with any PHP 8.4+ project.

📦 Installation

Requires PHP 8.4+

Install via Composer:

composer require oihana/php-logging

✅ Tests & coverage

Run the full unit-test suite (PHPUnit, strict mode):

composer test

Run a single test case:

./vendor/bin/phpunit --filter CompositeLoggerTest

Measure coverage (requires Xdebug or PCOV):

composer coverage        # text + Clover + HTML under build/coverage/
composer coverage:md     # readable Markdown summary (build/coverage/COVERAGE.md)

The suite runs in strict mode and targets 100% line coverage.

🧾 License

This project is licensed under the Mozilla Public License 2.0 (MPL-2.0).

👤 About the author

🛠️ Generate the Documentation

We use phpDocumentor to generate the documentation into the ./docs folder.

Usage

Run the command :

composer doc

🔗 Related packages

  • oihana/php-core – core helpers and utilities used by this library: https://github.com/BcommeBois/oihana-php-core
  • oihana/php-files – file and path handling utilities: https://github.com/BcommeBois/oihana-php-files
  • oihana/php-enums – a collection of strongly-typed constant enumerations for PHP: https://github.com/BcommeBois/oihana-php-enums

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MPL-2.0
  • 更新时间: 2026-06-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固