定制 jhuet/zdt-logger-module 二次开发

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

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

jhuet/zdt-logger-module

最新稳定版本:1.0.0

Composer 安装命令:

composer require jhuet/zdt-logger-module

包简介

A ZF3 module to log data using Zend\Log and write them to ZendDeveloperTools toolbar.

README 文档

README

A ZF3 module to log data using Zend\Log and write them to ZendDeveloperTools toolbar. If you already have a logger in your application (that is an instance of Zend\Log\Logger) it will integrate well with it so you still will only have to use your logger.

Installation

The easiest way is by using composer. Just add "jhuet/zdt-logger-module": "dev-master" (or "jhuet/zdt-logger-module": "0.3" for last stable version) as a requirement in your composer.json file and it will be automatically downloaded next time you do composer.phar update.

If you don't use composer, drop the files of this archive (0.3 here) in your module directory.

Then, add Jhu\ZdtLoggerModule in the list of activated modules of your application.config.php file.

Options

Configuration options are available in config/jhu-zdt-logger.global.php.dist file. If you want to change the default ones, copy it in your config/autoload directory, remove the .dist extension and edit it.

Options available :

  • logger : This module will by default create a Zend\Log\Logger and add a writer to it. If you already have a logger in your application, you can set it here so it will be used instead of creating a new one. The logger you'll set here has to be available thru the service manager.

Usage

If you don't already have a logger in your application, you may refere to this one any time you need to via the service manager with the jhu.zdt_logger key. Assuming $sm is the service maanger, you could call $sm->get('jhu.zdt_logger')->info('my log'); to log with the INFO priority.

If you already have a logger in your application and you have set it in the options, you just have to use your regular logger as you normally would and anything logged will be added to the ZendDeveloperTools toolbar.

Picture

usage example

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-02-03