logging.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Default Log Channel
  6. |--------------------------------------------------------------------------
  7. |
  8. | This option defines the default log channel that gets used when writing
  9. | messages to the logs. The name specified in this option should match
  10. | one of the channels defined in the "channels" configuration array.
  11. |
  12. */
  13. 'default' => env('LOG_CHANNEL', 'stack'),
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Log Channels
  17. |--------------------------------------------------------------------------
  18. |
  19. | Here you may configure the log channels for your application. Out of
  20. | the box, Laravel uses the Monolog PHP logging library. This gives
  21. | you a variety of powerful log handlers / formatters to utilize.
  22. |
  23. | Available Drivers: "single", "daily", "slack", "syslog",
  24. | "errorlog", "custom", "stack"
  25. |
  26. */
  27. 'channels' => [
  28. 'stack' => [
  29. 'driver' => 'stack',
  30. 'channels' => ['single'],
  31. ],
  32. 'single' => [
  33. 'driver' => 'single',
  34. 'path' => storage_path('logs/laravel.log'),
  35. 'level' => 'debug',
  36. ],
  37. 'daily' => [
  38. 'driver' => 'daily',
  39. 'path' => storage_path('logs/laravel.log'),
  40. 'level' => 'debug',
  41. 'days' => 7,
  42. ],
  43. 'slack' => [
  44. 'driver' => 'slack',
  45. 'url' => env('LOG_SLACK_WEBHOOK_URL'),
  46. 'username' => 'Laravel Log',
  47. 'emoji' => ':boom:',
  48. 'level' => 'critical',
  49. ],
  50. 'syslog' => [
  51. 'driver' => 'syslog',
  52. 'level' => 'debug',
  53. ],
  54. 'errorlog' => [
  55. 'driver' => 'errorlog',
  56. 'level' => 'debug',
  57. ],
  58. ],
  59. ];