Skip to content

jamesgsilva/monolog-kinesis-handler

Repository files navigation

monolog-kinesis-handler

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.