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

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <?php
  2. use Monolog\Handler\AmqpHandler;
  3. use PhpAmqpLib\Channel\AMQPChannel;
  4. use App\HiLib\Logger\CreateCustomLogger;
  5. use PhpAmqpLib\Connection\AMQPStreamConnection;
  6. return [
  7. 'default' => env('LOG_CHANNEL', 'stack'),
  8. 'channels' => [
  9. 'hi' => [
  10. 'driver' => 'custom',
  11. 'via' => CreateCustomLogger::class,
  12. 'handler' => AmqpHandler::class,
  13. 'with' => [
  14. 'exchange' => new AMQPChannel(
  15. new AMQPStreamConnection("liwo_rabbitmq_1", 5672, 'root', 'root')
  16. ),
  17. 'exchangeName' => 'log_exchange'
  18. ],
  19. ],
  20. 'stack' => [
  21. 'driver' => 'stack',
  22. 'channels' => ['hi', 'daily',],
  23. 'ignore_exceptions' => false,
  24. ],
  25. 'single' => [
  26. 'driver' => 'single',
  27. 'path' => storage_path('logs/laravel.log'),
  28. 'level' => 'debug',
  29. ],
  30. 'daily' => [
  31. 'driver' => 'daily',
  32. 'path' => storage_path('logs/laravel.log'),
  33. 'level' => 'debug',
  34. 'days' => 14,
  35. ],
  36. ],
  37. ];