logging.php 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. ];