boerl/zf1-log-psr3 问题修复 & 功能扩展

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

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

boerl/zf1-log-psr3

最新稳定版本:v0.1.1

Composer 安装命令:

composer require boerl/zf1-log-psr3

包简介

A wrapper around a Zend Framework 1 Logger to make it PSR-3 compatible.

README 文档

README

Did you ever want to use your good old (fashioned) ZF1 logger in a modern loosely coupled library that expects a PSR-3 compliant logger? Then this is the library for you. You can keep your existing logger (e.g. to share with other components of your software) and disguise it to feed it to the new library.

Features

  • PSR-3 style placeholders are rewritten to ZF1 style. E.g. {example} becomes %example%. (Can be disabled.)
  • logLevel is added to the extras cq context array. (Can be disabled.)
  • (Not directly related to the goal of this library, but useable for testing:) A very basic implementation of Zend_Log_Writer_Abstract is available: MemoryWriter. It keeps the formatted logged messages in memory, to be retrieved later.

Usage

Require this package with composer and use its autoloader.

// Start with your existing instance of Zend_Log.
$myZendLog = new \Zend_Log();

// Optionally create a configuration array.
$optionalConfig = ['foo' => 'bar'];

// Instantiate the Wrapper from the existing Zend_Log and optionally the configuration.
$myPsr3CompliantLogger = new \Boerl\Zf1LogPsr3\Wrapper($myZendLog, $optionalConfig);

For available configuration options, look at Wrapper::getDefaultConfig().

Links

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固