承接 vysinsky/hipchat-logger 相关项目开发

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

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

vysinsky/hipchat-logger

Composer 安装命令:

composer require vysinsky/hipchat-logger

包简介

Simple logger class for HipChat

README 文档

README

PSR-3 compatible logger class which will send you notification to your HipChat room.

Screenshot (taken with Nette Framework's Tracy bridge)

Screenshot

Installation

Via composer require vysinsky/hipchat-logger:@dev

Configuration

Class Vysinsky\HipChat\Logger has some static properties you can use to configure:

  • notifyLevels - Array of levels for which notification (HipChat's popup) is enabled
  • colors - Basic colors setup based on log level. In case of unknown key yellow color will be used

Available bridges

Nette Framework (Tracy)

For Nette there is compiler extension. Just add it to your extensions list in neon configuration:

hipChatLogger: Vysinsky\HipChat\Bridges\Tracy\DI\Extension

And add some configuration:

hipChatLogger:
    accessToken: yourAccessToken
    roomName: test
    filters:
        - [LoggerFilter, filterAccess]
    linkFactory: [MyLinkFactory::createLink] # Set link factory

Other features

Filters

You can now easilly filter messages and decide, whether message should be sent. Filters are simple callbacks which get $level, $message and $context as parameter. Filter return boolean $shouldSend. As soon as any filter returns FALSE execution is stopped.

Example (we don't want to log 404s):

class LoggerFilter 
{
    function filterAccess($level, $message, $context)
    {
        return $level !== 'access';
    }
}

Log file link factory

You can set callback factory to Logger, which will create link to log file and send it in message if link is available.

You can set it with calling setLinkToLogFileFactory (only in Vysinsky\HipChat\Bridges\Tracy):

$logger->setLinkToLogFileFactory(function(Vysinsky\HipChat\Bridges\Tracy $logger, $logPath){
	return $logger->extractLogPath($logPath);
});

统计信息

  • 总下载量: 1.51k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固