smsapi / monolog-smsapi
A Monolog Handler for SMSAPI
v0.2.3
2017-12-14 14:37 UTC
Requires
- php: 5.6.*
- beberlei/assert: ^2.5
- monolog/monolog: ^1.19
- smsapi/php-client: ^1
Requires (Dev)
- phpunit/phpunit: ^5
This package is auto-updated.
Last update: 2024-12-14 22:40:29 UTC
README
About
Monolog Handler and Formatter to send logs using SMSAPI.
monolog-smsapi
is SemVer 2.0.0 compatible.
Installation
composer require smsapi/monolog-smsapi:^0.2.2
Usage
use MonologSmsapi\SmsapiHandlerBuilder; use Monolog\Logger; $configData = [ SmsapiConfig::SENDER_CLIENT => new Client(''), SmsapiConfig::SENDER_FROM => 'Info', SmsapiConfig::SENDER_TO => 0, ]; $handlerBuilder = new SmsapiHandlerBuilder; $handler = $handlerBuilder->buildFromNativeConfig($config); $logger = new Logger('example'); $logger->pushHandler($handler); $logger->addCritical('critical bug');