承接 shalvah/monolog-pusher 相关项目开发

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

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

shalvah/monolog-pusher

最新稳定版本:2.2

Composer 安装命令:

composer require shalvah/monolog-pusher

包简介

Monolog handler for sending logs to Pusher

README 文档

README

Build Status Latest Stable Version

Monolog handler that sends logs to Pusher Channels.

Installation

composer require shalvah/monolog-pusher

Usage

$config = ['YOUR_APP_KEY', 'YOUR_APP_SECRET', 'YOUR_APP_ID', ['cluster' => 'YOUR_APP_CLUSTER']];
$handler = new \Shalvah\MonologPusher\PusherHandler($config);
  • Alternatively, if you've already got an existing Pusher instance, you can pass that to the handler:
$pusher = new \Pusher\Pusher();
$handler = new \Shalvah\MonologPusher\PusherHandler($pusher);
  • Attach the handler to your Monolog logger:
$logger = new \Monolog\Logger('pusher-logs');
$logger->pushHandler($handler);
  • Now you can call the various log methods (info, error, debugand so forth) on your logger to send a log message to Pusher. The name of the Pusher channel used will be the name you set when creating your Logger (in the above example, "pusher-logs"). The name of the event will be log:
$logger->error('oops!');

By default, the PusherHandler will only log messages of level error and above. You can change this by passing a minimum level as a second parameter to the constructor:

$handler = new \Shalvah\MonologPusher\PusherHandler($config, \Monolog\Logger::DEBUG);

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固