jamesgsilva/monolog-kinesis-handler

A monolog handler for AWS Kinesis streams

v1.0.1 2021-02-15 00:15 UTC

This package is auto-updated.

Last update: 2024-10-15 08:14:58 UTC


README

A monolog handler for AWS Kinesis streams.

Installation

Require this library through composer:

$ composer require jamesgsilva/monolog-kinesis-handler

Usage

You can find usage examples here using kinesalite an implementation of Amazon's Kinesis built on LevelDB.

<?php

$kinesis = new \Aws\Kinesis\KinesisClient(['region' => 'us-west-2', 'version' => 'latest']);
$kinesisHandler = new \JamesGSilva\MonologKinesisHandler\KinesisHandler($kinesis, 'stream-name');
$logger = new \Monolog\Logger('channel');
$logger->pushHandler($kinesisHandler);
$logger->info('Hello Kinesis');

Contributing

Feel free to contribute by opening a pull request. Bug fixes or feature suggestions are always welcome. See CONTRIBUTING.md for information.