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.

149 lines
4.6KB

  1. <?php
  2. use Monolog\Handler\NullHandler;
  3. use Monolog\Handler\StreamHandler;
  4. use Monolog\Handler\SyslogUdpHandler;
  5. use Monolog\Processor\PsrLogMessageProcessor;
  6. return [
  7. /*
  8. |--------------------------------------------------------------------------
  9. | Default Log Channel
  10. |--------------------------------------------------------------------------
  11. |
  12. | This option defines the default log channel that gets used when writing
  13. | messages to the logs. The name specified in this option should match
  14. | one of the channels defined in the "channels" configuration array.
  15. |
  16. */
  17. 'default' => env('LOG_CHANNEL', 'stack'),
  18. /*
  19. |--------------------------------------------------------------------------
  20. | Deprecations Log Channel
  21. |--------------------------------------------------------------------------
  22. |
  23. | This option controls the log channel that should be used to log warnings
  24. | regarding deprecated PHP and library features. This allows you to get
  25. | your application ready for upcoming major versions of dependencies.
  26. |
  27. */
  28. 'deprecations' => [
  29. 'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
  30. 'trace' => false,
  31. ],
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Log Channels
  35. |--------------------------------------------------------------------------
  36. |
  37. | Here you may configure the log channels for your application. Out of
  38. | the box, Laravel uses the Monolog PHP logging library. This gives
  39. | you a variety of powerful log handlers / formatters to utilize.
  40. |
  41. | Available Drivers: "single", "daily", "slack", "syslog",
  42. | "errorlog", "monolog",
  43. | "custom", "stack"
  44. |
  45. */
  46. 'channels' => [
  47. 'stack' => [
  48. 'driver' => 'stack',
  49. 'channels' => ['single'],
  50. 'ignore_exceptions' => false,
  51. ],
  52. 'single' => [
  53. 'driver' => 'single',
  54. 'path' => storage_path('logs/laravel.log'),
  55. 'level' => env('LOG_LEVEL', 'debug'),
  56. 'replace_placeholders' => true,
  57. ],
  58. 'web' => [
  59. 'driver' => 'daily',
  60. 'path' => storage_path('logs/web.log'),
  61. 'level' => env('LOG_LEVEL', 'debug'),
  62. 'days' => 14,
  63. 'permission' => 0666,
  64. 'replace_placeholders' => true,
  65. ],
  66. 'batch' => [
  67. 'driver' => 'daily',
  68. 'path' => storage_path('logs/batch.log'),
  69. 'level' => env('LOG_LEVEL', 'debug'),
  70. 'days' => 14,
  71. 'permission' => 0666,
  72. 'replace_placeholders' => true,
  73. ],
  74. 'queue' => [
  75. 'driver' => 'daily',
  76. 'path' => storage_path('logs/queue.log'),
  77. 'level' => env('LOG_LEVEL', 'debug'),
  78. 'days' => 14,
  79. 'permission' => 0666,
  80. 'replace_placeholders' => true,
  81. ],
  82. 'slack' => [
  83. 'driver' => 'slack',
  84. 'url' => env('LOG_SLACK_WEBHOOK_URL'),
  85. 'username' => 'Laravel Log',
  86. 'emoji' => ':boom:',
  87. 'level' => env('LOG_LEVEL', 'critical'),
  88. 'replace_placeholders' => true,
  89. ],
  90. 'papertrail' => [
  91. 'driver' => 'monolog',
  92. 'level' => env('LOG_LEVEL', 'debug'),
  93. 'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
  94. 'handler_with' => [
  95. 'host' => env('PAPERTRAIL_URL'),
  96. 'port' => env('PAPERTRAIL_PORT'),
  97. 'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
  98. ],
  99. 'processors' => [PsrLogMessageProcessor::class],
  100. ],
  101. 'stderr' => [
  102. 'driver' => 'monolog',
  103. 'level' => env('LOG_LEVEL', 'debug'),
  104. 'handler' => StreamHandler::class,
  105. 'formatter' => env('LOG_STDERR_FORMATTER'),
  106. 'with' => [
  107. 'stream' => 'php://stderr',
  108. ],
  109. 'processors' => [PsrLogMessageProcessor::class],
  110. ],
  111. 'syslog' => [
  112. 'driver' => 'syslog',
  113. 'level' => env('LOG_LEVEL', 'debug'),
  114. 'facility' => LOG_USER,
  115. 'replace_placeholders' => true,
  116. ],
  117. 'errorlog' => [
  118. 'driver' => 'errorlog',
  119. 'level' => env('LOG_LEVEL', 'debug'),
  120. 'replace_placeholders' => true,
  121. ],
  122. 'null' => [
  123. 'driver' => 'monolog',
  124. 'handler' => NullHandler::class,
  125. ],
  126. 'emergency' => [
  127. 'path' => storage_path('logs/laravel.log'),
  128. ],
  129. ],
  130. ];