Нет описания

logging.php 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. use Monolog\Handler\StreamHandler;
  3. use Monolog\Handler\SyslogUdpHandler;
  4. return [
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Default Log Channel
  8. |--------------------------------------------------------------------------
  9. |
  10. | This option defines the default log channel that gets used when writing
  11. | messages to the logs. The name specified in this option should match
  12. | one of the channels defined in the "channels" configuration array.
  13. |
  14. */
  15. 'default' => env('LOG_CHANNEL', 'stack'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Log Channels
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here you may configure the log channels for your application. Out of
  22. | the box, Laravel uses the Monolog PHP logging library. This gives
  23. | you a variety of powerful log handlers / formatters to utilize.
  24. |
  25. | Available Drivers: "single", "daily", "slack", "syslog",
  26. | "errorlog", "monolog",
  27. | "custom", "stack"
  28. |
  29. */
  30. 'channels' => [
  31. 'stack' => [
  32. 'driver' => 'stack',
  33. 'channels' => ['daily'],
  34. 'ignore_exceptions' => false,
  35. ],
  36. 'single' => [
  37. 'driver' => 'single',
  38. 'path' => storage_path('logs/laravel.log'),
  39. 'level' => 'debug',
  40. 'permission' => 0644,
  41. ],
  42. 'daily' => [
  43. 'driver' => 'daily',
  44. 'path' => storage_path('logs/laravel.log'),
  45. 'level' => 'debug',
  46. 'days' => 14,
  47. 'permission' => 0664,
  48. ],
  49. 'slack' => [
  50. 'driver' => 'slack',
  51. 'url' => env('LOG_SLACK_WEBHOOK_URL'),
  52. 'username' => 'Laravel Log',
  53. 'emoji' => ':boom:',
  54. 'level' => 'critical',
  55. ],
  56. 'papertrail' => [
  57. 'driver' => 'monolog',
  58. 'level' => 'debug',
  59. 'handler' => SyslogUdpHandler::class,
  60. 'handler_with' => [
  61. 'host' => env('PAPERTRAIL_URL'),
  62. 'port' => env('PAPERTRAIL_PORT'),
  63. ],
  64. ],
  65. 'stderr' => [
  66. 'driver' => 'monolog',
  67. 'handler' => StreamHandler::class,
  68. 'formatter' => env('LOG_STDERR_FORMATTER'),
  69. 'with' => [
  70. 'stream' => 'php://stderr',
  71. ],
  72. ],
  73. 'syslog' => [
  74. 'driver' => 'syslog',
  75. 'level' => 'debug',
  76. ],
  77. 'errorlog' => [
  78. 'driver' => 'errorlog',
  79. 'level' => 'debug',
  80. ],
  81. ],
  82. ];