You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
<?php
|
|
|
|
use Monolog\Handler\AmqpHandler;
|
|
use PhpAmqpLib\Channel\AMQPChannel;
|
|
use App\HiLib\Logger\CreateCustomLogger;
|
|
use PhpAmqpLib\Connection\AMQPStreamConnection;
|
|
|
|
return [
|
|
|
|
'default' => env('LOG_CHANNEL', 'stack'),
|
|
|
|
'channels' => [
|
|
'hi' => [
|
|
'driver' => 'custom',
|
|
'via' => CreateCustomLogger::class,
|
|
'handler' => AmqpHandler::class,
|
|
'with' => [
|
|
'exchange' => new AMQPChannel(
|
|
new AMQPStreamConnection("base-rabbitmq", 5672, 'root', 'root')
|
|
),
|
|
'exchangeName' => 'log_exchange'
|
|
],
|
|
],
|
|
|
|
'stack' => [
|
|
'driver' => 'stack',
|
|
'channels' => ['hi', 'daily',],
|
|
'ignore_exceptions' => false,
|
|
],
|
|
|
|
'single' => [
|
|
'driver' => 'single',
|
|
'path' => storage_path('logs/laravel.log'),
|
|
'level' => 'debug',
|
|
],
|
|
|
|
'daily' => [
|
|
'driver' => 'daily',
|
|
'path' => storage_path('logs/laravel.log'),
|
|
'level' => 'debug',
|
|
'days' => 14,
|
|
],
|
|
],
|
|
];
|