ermolinme / cloudlog
Package for CloudLog.me
v0.2.0
2023-05-06 07:56 UTC
Requires
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0
- monolog/monolog: ^1.23|^2.0
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');