Logger
, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist lxpgw/logger "~1.0.0"
or add, (*4)
"lxpgw/logger": "~1.0.0"
to the require section of your composer.json file., (*5)
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., (*6)
License
, (*7)