承接 logger/essentials 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

logger/essentials

最新稳定版本:1.0.1.1

Composer 安装命令:

composer require logger/essentials

包简介

Advanced logging component library

README 文档

README

Latest Stable Version License

A lightweight, composable logging toolkit for PHP that implements the PSR‑3 LoggerInterface and lets you build flexible pipelines. Combine output loggers (e.g., streams, syslog) with formatters, filters, and extenders to shape messages, enrich context, and route by severity. Includes an ExtendedLogger for hierarchical captions and execution scopes.

Quick taste

use Logger\Builder;
use Logger\Formatters\TemplateFormatter;
use Logger\Loggers\ResourceLogger;
use Psr\Log\LoggerInterface;

$logger = Builder::chain(
    ResourceLogger::outputToStdOut(),
    fn (LoggerInterface $l) => new TemplateFormatter($l)
);

$logger->info('Hello world', ['id' => 42]);

Component overview

  • Common — ExtendedLogger for hierarchical captions and contextual scopes.
  • Formatters — Render and transform messages (Template, DateTime, Prefix, JSON, etc.).
  • Filters — Pass/drop by rules (min/max/range level, callbacks, regex).
  • Loggers — Output sinks: streams, syslog, callbacks, in‑memory array.
  • Extenders — Side‑effect hooks and enrichment (context, stacktrace, metrics).
  • Manipulators — Adjust semantics like compressing log levels.

How it differs from other logging solutions:

统计信息

  • 总下载量: 57.6k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 1
  • 依赖项目数: 5
  • 推荐数: 4

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-20