承接 aoyagikouhei/slim-fluent-logwriter 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

aoyagikouhei/slim-fluent-logwriter

最新稳定版本:0.0.4

Composer 安装命令:

composer require aoyagikouhei/slim-fluent-logwriter

包简介

slim fluent logwriter

README 文档

README

A Fluentd log writter for Slim Framework. slim-fluent-logwriter require Slim 2.0+.

Installation

Add "aoyagikouhei/slim-fluent-logwriter" to your composer.json file:

{
  "require": {
    "slim/slim": "2.2.*",
    "aoyagikouhei/slim-fluent-logwriter": "0.0.*"
  }
}

And install using composer:

$ php composer.phar install

Configuration

$writer = new \Slim\FluentLogwriter(array('host' => 'localhost'));
$app = new \Slim\Slim(array(
  'log.writer' => $writer,
));

Full options specified

$callable = function($logger, $entity, $error) {
    throw $error;
};
$writer = new \Slim\FluentLogwriter(array(
  'host' => 'localhost',
  'port' => '24224',
  'tag' => 'mongo.systemlog',
  'level' => \Slim\Log::INFO,
  'tag_with_date' => 'Ym',
  'error_handler' => $callable
));
$writer->addFluent(array(
  'host' => 'localhost',
  'port' => '24224',
  'tag' => 'mail.systemlog',
  'level' => \Slim\Log::WARN
));
$app = new \Slim\Slim(array(
  'log.writer' => $writer,
));

First Fluent Settings is to mongodb log.

Second Fluent Setting is to mail.

You can add more Fluent settings.

Options

host : host name, default 'localhost'

port : port, default '24224'

tag : fluent tag name, default 'systemlog'

level : write log level, default \Slim\Log::DEBUG

tag_with_date : postfix date for tag by DateTime format, default none

error_handler : when call error, default stderr

Copyright

Copyright (c) 2013 Kouhei Aoyagi.

统计信息

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

GitHub 信息

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

其他信息

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