smsapi / monolog-smsapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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');

Changelog

Changelog

License

Apache 2.0 License

About

License:Other


Languages

Language:PHP 100.0%