lxpgw/logger

通过 pubu.im 发送日志

1.0.0 2016-03-28 06:07 UTC

This package is auto-updated.

Last update: 2024-09-08 19:20:17 UTC


README

Build Status version Download Scrutinizer Code Quality Code Coverage Contact

安装

安装此扩展的首选方法是通过 composer.

运行以下命令之一:

php composer.phar require --prefer-dist lxpgw/logger "~1.0.0"

或者将以下内容添加到您的 composer.json 文件的 require 部分:

"lxpgw/logger": "~1.0.0"

to the require section of your composer.json file.

使用方法

使用 log 组件直接发送消息

$pubu = new \lxpgw\logger\Pubu(['remote' => 'your pubu.im service url']);
$logger->send('Hello');

//with attachments
$pubu->send('Hello', [
    ['title' => 'This is title', 'description' => 'This is description.']
]);

with the log component

[
    'log' => [
        'targets' => [
            'class' => \lxpgw\logger\LogTarget,
            'chanel' => 'the pubu.im service url', // Config the channel you want send to.
            'exportInterval' => 1, //send per message directly
            'logVars' => [],
        ]
    ]
]

测试

$ composer test

变更日志

请参阅 CHANGELOG 了解最近更改的详细信息。

许可证

MIT