ermolinme/cloudlog

Package for CloudLog.me

v0.2.0 2023-05-06 07:56 UTC

This package is auto-updated.

Last update: 2024-04-18 07:35:49 UTC


README

CloudLog.me - is simple logging system.

Using

Just a few lines of code:

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

That's all!

Laravel

You can use this package as a Laravel logger.

php artisan vendor:publish --provider="Ermolinme\CloudLog\CloudLogServiceProvider" --tag="config"

Create log config in config/logging.php

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

And use it!

Log::channel('cloud')->info('Hello world');