SMSAPI Monolog Handler And Formatter
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');