定制 jspalink/apix-log-pushover 二次开发

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

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

jspalink/apix-log-pushover

Composer 安装命令:

composer require jspalink/apix-log-pushover

包简介

A Pushover logger for APIx Log

README 文档

README

#Pushover logger for Apix Log

An extension for the Apix/Log PSR-3 logger that sends log messages via Pushover.net via the 3rd party Pushy API implementation.

Apix Log was written by Franck Cassedanne (@frqnck). This extension is by Jonathan Spalink (@jspalink) and is released under the BSD-3 license.

##Installation

You can install the Pushover logger using composer:

{
  "require": {
    "jspalink/apix-log-pushover": "dev-master"
  }
}

See composer and packagist for more information.

##Usage

Create an Apix Pushover Log instance, providing pre-configured Pushy Client and User instances to the constructor. The new Log instance will be used for all subsequent messages sent through to Pushover.

By default, the logger will send a push notification for each log message received. Especially given Pushover's monthly limitations and "Being Friendly" clauses, I recommend calling $logger->setDeferred(true) to aggregate log messages and send them in one message when the destructor is called.

There is also a character length limitation for Pushover of 1024 characters. The Pushover Logger will truncate at 1024 characters and will not indicate that the message would have been longer. This means that you may possibly lose valuable logging information if you aggregate too much at once.

##Example

// Create Pushy Client and User instances
$pushy_client = new Pushy\Client('APPLICATION KEY');
$pushy_user = new Pushy\User('USER/GROUP ID');

$logger = new Apix\Logger\Pushover($pushy_client, $pushy_user);
$logger->setDeferred(true);
$logger->info('Info about something');
$logger->error('An error occurred');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-07-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固