axleus/axleus-log 问题修复 & 功能扩展

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

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

axleus/axleus-log

Composer 安装命令:

composer require axleus/axleus-log

包简介

Axleus Logging component

README 文档

README

PHP Version Latest Stable Version License Continuous Integration Coverage Status

This package provides logging via Monolog for Mezzio (PSR-15) applications. It provides log handlers backed by laminas-db or php-db/phpdb for writing logs to a database table. It also provides a PSR-14 event listener and a Laminas EventManager bridge listener for error logging.

Documentation

Quick Start

Install the package and let laminas-component-installer inject the ConfigProvider:

composer require axleus/axleus-log

Import the database schema and add the package's ConfigProvider to your config aggregator if not done automatically. Then pipe the middleware into your application pipeline:

// config/pipeline.php
$app->pipe(\Axleus\Log\Middleware\MonologMiddleware::class);

Enable optional features via config:

// config/autoload/log.local.php
use Psr\Log\LoggerInterface;

return [
    LoggerInterface::class => [
        'log_errors'     => true,  // auto-log uncaught exceptions
        'process_uuid'   => true,  // add UUID v7 to every record
        'channel'        => 'app', // LogChannel enum value
    ],
];

See the full documentation for details on all options, handlers, processors, and event-driven logging.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-11-17