PHP code example of aporat / laravel-cloudwatch-logger
1. Go to this page and download the library: Download aporat/laravel-cloudwatch-logger 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/ */
aporat / laravel-cloudwatch-logger example snippets
'cache' => true, // the application's default cache store
'cache' => 'redis', // a specific store from config/cache.php
'cache' => App\MyPool::class, // any PSR-6 CacheItemPoolInterface
'cache' => $poolInstance,
'cache_ttl' => 300,
// 1. A LineFormatter template.
'formatter' => '%channel%: %level_name%: %message% %context% %extra%',
// 2. A FormatterInterface class name, resolved through the container.
'formatter' => Monolog\Formatter\JsonFormatter::class,
// 3. An instance.
'formatter' => new Monolog\Formatter\JsonFormatter,
// 4. A callable receiving the channel config.
'formatter' => fn (array $config) => new Monolog\Formatter\JsonFormatter,