承接 elementary/logger-trait 相关项目开发

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

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

elementary/logger-trait

Composer 安装命令:

composer require elementary/logger-trait

包简介

Extend \Psr\Log\LoggerAwareTrait

README 文档

README

The trait LogerTrait extends LoggerAwareTrait with one method getLoger().

Latest Stable Version License Build Status Coverage Status

Installation

The preferred way to install this extension is through composer and then run

composer require elementary/logger-trait

Usage

use elementary\logger\traits\LoggerGetInterface;
use elementary\logger\traits\LoggerTrait;
use Psr\Log\LoggerAwareInterface;

class Example implements LoggerGetInterface, LoggerAwareInterface
{
    use LoggerTrait;

    public function doSomeThing()
    {
        // do some thing
        $this->getLogger()->info('do some thing');
    }
}

$ex = new Example();

// In this case, the message will be sent to `\Psr\Log\NullLogger`
$ex->doSomeThing();

// Now message will be send to Graylog
$ex->setLogger(new \Gelf\Logger($publisher, $facility));
$ex->doSomeThing(); 

Testing and Code coverage

Unit Tests are located in tests directory. You can run your tests and collect coverage with the following command:

vendor/bin/phpunit

Result of coverage will be output into the tests/output directory.

License

For license information check the LICENSE-file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固