抖音小程序

logging.php 2.2KB

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