smsapi/monolog-smsapi

A Monolog Handler for SMSAPI

v0.2.3 2017-12-14 14:37 UTC

This package is auto-updated.

Last update: 2024-10-14 22:19:54 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');

Changelog

Changelog

License

Apache 2.0 License