PHP code example of ermolinme / cloudlog

1. Go to this page and download the library: Download ermolinme/cloudlog 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/ */

    

ermolinme / cloudlog example snippets


$apiToken = YOUR_TOKEN_HERE;
$channelId = YOUR_CHANNEL_ID_HERE; 

$cloudLog = new CloudLog($apiToken);
$cloudLog->channel($channelId);
$cloudLog->tag('my_cool_tag'); //optional
$cloudLog->info('Hello world!', ['foo' => 'bar']);
$cloudLog->error('Whoops!');
$cloudLog->critical('OMG!');

...
'cloud' => [
    'driver' => 'custom',
    'via'    => \Ermolinme\CloudLog\CustomLogger::class,
    'level'  => 'debug',
],
...

Log::channel('cloud')->info('Hello world');
bash
php artisan vendor:publish --provider="Ermolinme\CloudLog\CloudLogServiceProvider" --tag="config"