PHP code example of jamesgsilva / monolog-kinesis-handler

1. Go to this page and download the library: Download jamesgsilva/monolog-kinesis-handler library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jamesgsilva / monolog-kinesis-handler example snippets




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