PHP code example of attlaz / attlaz-monolog
1. Go to this page and download the library: Download attlaz/attlaz-monolog 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/ */
attlaz / attlaz-monolog example snippets
use Monolog\Logger;
use \Attlaz\Client;
use \Attlaz\AttlazMonolog\Handler\AttlazHandler;
$attlazClient = new Client('<your-token>', '<your-token>');
$attlazHandler = new AttlazHandler($client, new LogStreamId('Vt9HtWRee'), Level::Info);
/** @var $logger Monolog\Logger */
$logger->pushHandler($attlazHandler);
// Add records to the log
$log->warning('Foo');
$log->error('Bar');