定制 dakatsuka/monolog-fluent-handler 二次开发

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

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

dakatsuka/monolog-fluent-handler

最新稳定版本:1.2.0

Composer 安装命令:

composer require dakatsuka/monolog-fluent-handler

包简介

Fluentd Handler for Monolog

README 文档

README

Latest Stable Version Latest Unstable Version

Fluentd Handler for Monolog

Installation

Add this lines to your composer.json:

{
    "require": {
        "dakatsuka/monolog-fluent-handler": "1.2.0"
    }
}

And then execute:

$ php composer.phar install

Usage

<?php
use Dakatsuka\MonologFluentHandler\FluentHandler;
use Monolog\Logger;

$logger = new Logger('dakatsuka');
$logger->pushHandler(new FluentHandler());

$logger->debug('example.monolog', array('foo' => 'bar'));
$logger->info('example.fluentd', array('fizz' => 'buzz'));

// Fluentd:
// 2013-10-11 01:00:00 +0900 dakatsuka.example.monolog: {"foo":"bar","level":"DEBUG"}
// 2013-10-11 01:00:00 +0900 dakatsuka.example.fluentd: {"fizz":"buzz","level":"INFO"}

You can specify the host name and port.

<?php
$logger = new Logger('dakatsuka');
$logger->pushHandler(new FluentHandler(null, '127.0.0.1', 24224));

You can specify the FluentLogger object.

<?php
$fluent = new FluentLogger("localhost", 24224);
$logger = new Logger('dakatsuka');
$logger->pushHandler(new FluentHandler($fluent));

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Test

$ make phpunit
$ make test

Copyright

Copyright (C) 2013-2015 Dai Akatsuka, released under the MIT License.

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

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