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
- Install the PgLogger ZF2 module
by cloning it into
./vendor/. - Clone this project into your
./vendor/directory.
With composer
-
Add this project in your composer.json:
"require": { "earlhickey/pg-logger": "0.*" }
-
Now tell composer to download PgLogger by running the command:
$ php composer.phar update
Post installation
-
Enabling it in your
application.config.phpfile.<?php return array( 'modules' => array( // ... 'PgLogger', ), // ... );
-
Copy
./vendor/earlhickey/PgLogger/config/pg-logger.global.php.distto./config/autoload/pg-logger.global.phpand change the values as desired. -
Create directory
data/login the root of your ZF2 project.
Usage
- Call the logger service directly:
$this->getServiceLocator()->get('PgLogger\Service\Logger')->crit('test');
- Use triggers:
$this->getEventManager()->trigger('log', $this, array('message' => $message, 'priority' => Logger::CRIT));
- message
- priority is optional (default: INFO)
统计信息
- 总下载量: 294
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-05-21