定制 earlhickey/pg-logger 二次开发

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

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

earlhickey/pg-logger

最新稳定版本:0.2.1

Composer 安装命令:

composer require earlhickey/pg-logger

包简介

ZF2 logging module

README 文档

README

ZF2 Logging Module

Log to DB, Email, File, Syslog, FirePHP. Fully customizable with config file.

Call logger directly or with triggers.

Installation

Main Setup

By cloning project

  1. Install the PgLogger ZF2 module by cloning it into ./vendor/.
  2. Clone this project into your ./vendor/ directory.

With composer

  1. Add this project in your composer.json:

    "require": {
        "earlhickey/pg-logger": "0.*"
    }
  2. Now tell composer to download PgLogger by running the command:

    $ php composer.phar update

Post installation

  1. Enabling it in your application.config.php file.

    <?php
    return array(
        'modules' => array(
            // ...
            'PgLogger',
        ),
        // ...
    );
  2. Copy ./vendor/earlhickey/PgLogger/config/pg-logger.global.php.dist to ./config/autoload/pg-logger.global.php and change the values as desired.

  3. Create directory data/log in the root of your ZF2 project.

Usage

  1. Call the logger service directly:
    $this->getServiceLocator()->get('PgLogger\Service\Logger')->crit('test');
  2. Use triggers:
    $this->getEventManager()->trigger('log', $this, array('message' => $message, 'priority' => Logger::CRIT));
    • message
    • priority is optional (default: INFO)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-05-21