lxpgw/logger

Send log via pubu.im

1.0.0 2016-03-28 06:07 UTC

This package is auto-updated.

Last update: 2024-11-08 19:35:27 UTC


README

Build Status version Download Scrutinizer Code Quality Code Coverage Contact

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"lxpgw/logger": "~1.0.0"

to the require section of your composer.json file.

Usage

send message directly

$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' => [],
        ]
    ]
]

Tests

$ composer test

Change Log

Please see CHANGELOG for more information what has changed recently.

License

MIT