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.

122 lines
3.7 KiB

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