My beer compendium
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.

105 lines
3.0 KiB

3 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. | Log Channels
  20. |--------------------------------------------------------------------------
  21. |
  22. | Here you may configure the log channels for your application. Out of
  23. | the box, Laravel uses the Monolog PHP logging library. This gives
  24. | you a variety of powerful log handlers / formatters to utilize.
  25. |
  26. | Available Drivers: "single", "daily", "slack", "syslog",
  27. | "errorlog", "monolog",
  28. | "custom", "stack"
  29. |
  30. */
  31. 'channels' => [
  32. 'stack' => [
  33. 'driver' => 'stack',
  34. 'channels' => ['single'],
  35. 'ignore_exceptions' => false,
  36. ],
  37. 'single' => [
  38. 'driver' => 'single',
  39. 'path' => storage_path('logs/laravel.log'),
  40. 'level' => env('LOG_LEVEL', 'debug'),
  41. ],
  42. 'daily' => [
  43. 'driver' => 'daily',
  44. 'path' => storage_path('logs/laravel.log'),
  45. 'level' => env('LOG_LEVEL', 'debug'),
  46. 'days' => 14,
  47. ],
  48. 'slack' => [
  49. 'driver' => 'slack',
  50. 'url' => env('LOG_SLACK_WEBHOOK_URL'),
  51. 'username' => 'Laravel Log',
  52. 'emoji' => ':boom:',
  53. 'level' => env('LOG_LEVEL', 'critical'),
  54. ],
  55. 'papertrail' => [
  56. 'driver' => 'monolog',
  57. 'level' => env('LOG_LEVEL', 'debug'),
  58. 'handler' => SyslogUdpHandler::class,
  59. 'handler_with' => [
  60. 'host' => env('PAPERTRAIL_URL'),
  61. 'port' => env('PAPERTRAIL_PORT'),
  62. ],
  63. ],
  64. 'stderr' => [
  65. 'driver' => 'monolog',
  66. 'level' => env('LOG_LEVEL', 'debug'),
  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' => env('LOG_LEVEL', 'debug'),
  76. ],
  77. 'errorlog' => [
  78. 'driver' => 'errorlog',
  79. 'level' => env('LOG_LEVEL', 'debug'),
  80. ],
  81. 'null' => [
  82. 'driver' => 'monolog',
  83. 'handler' => NullHandler::class,
  84. ],
  85. 'emergency' => [
  86. 'path' => storage_path('logs/laravel.log'),
  87. ],
  88. ],
  89. ];