定制 galvao-eti/monolog-wrapper 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

galvao-eti/monolog-wrapper

最新稳定版本:1.0

Composer 安装命令:

composer require galvao-eti/monolog-wrapper

包简介

A wrapper around Monolog that implements a few standards and provides a decent level of customization.

README 文档

README

A wrapper around monolog that implements a few common standards, such as:

  • A single folder path where log files are stored;
  • Using dates (Y-m-d) as a filename;
  • A pattern for log lines that prioritizes severity and time first.

while also letting you add as many streams and processors as you wish.

Installation

composer require galvao-eti/monolog-wrapper

Usage

use GalvaoEti\MonologWrapper;

// If you wish to add streams and/or processors just add them to the static attributes:
MonologWrapper::$streams['streamName'] = 'streamSeverity';
MonologWrapper::$processors[] = new \Monolog\Processor\WebProcessor(null, [
    'ip' => 'REMOTE_ADDR',
    'referrer' => 'HTTP_REFERER',
    'method' => 'REQUEST_METHOD',
]);

$logger = MonologWrapper::getInstance();

// From here onwards just use Moolog's own methods, such as debug(), info(), etc...

Credits

Made for Galvão Desenvolvimento Ltda. by Er Galvão Abbott.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-04-14