logging.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <?php
  2. use Monolog\Handler\StreamHandler;
  3. use Monolog\Logger;
  4. return [
  5. /*
  6. |--------------------------------------------------------------------------
  7. | Default Log Channel
  8. |--------------------------------------------------------------------------
  9. |
  10. | This option defines the default log channel that gets used when writing
  11. | messages to the logs. The name specified in this option should match
  12. | one of the channels defined in the "channels" configuration array.
  13. |
  14. */
  15. 'default' => env('LOG_CHANNEL', 'stack'),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Log Channels
  19. |--------------------------------------------------------------------------
  20. |
  21. | Here you may configure the log channels for your application. Out of
  22. | the box, Laravel uses the Monolog PHP logging library. This gives
  23. | you a variety of powerful log handlers / formatters to utilize.
  24. |
  25. | Available Drivers: "single", "daily", "slack", "syslog",
  26. | "errorlog", "monolog",
  27. | "custom", "stack"
  28. |
  29. */
  30. 'channels' => [
  31. 'stack' => [
  32. 'driver' => 'stack',
  33. 'channels' => ['daily', 'dingding'],
  34. ],
  35. 'single' => [
  36. 'driver' => 'single',
  37. 'path' => storage_path('logs/laravel.log'),
  38. 'level' => 'debug',
  39. ],
  40. 'appleStorePay' => [
  41. 'driver' => 'daily',
  42. 'path' => storage_path('logs/appleStorePay.log'),
  43. 'level' => 'debug',
  44. 'days' => 7,
  45. 'permission' => 0666
  46. ],
  47. 'googlePay' => [
  48. 'driver' => 'daily',
  49. 'path' => storage_path('logs/appleStorePay.log'),
  50. 'level' => 'debug',
  51. 'days' => 7,
  52. 'permission' => 0666
  53. ],
  54. 'cashPay' => [
  55. 'driver' => 'daily',
  56. 'path' => storage_path('logs/cashPay.log'),
  57. 'level' => 'debug',
  58. 'days' => 60,
  59. 'permission' => 0666
  60. ],
  61. 'fastPay' => [
  62. 'driver' => 'daily',
  63. 'path' => storage_path('logs/fastPay.log'),
  64. 'level' => 'debug',
  65. 'days' => 60,
  66. 'permission' => 0666
  67. ],
  68. 'nicePay' => [
  69. 'driver' => 'daily',
  70. 'path' => storage_path('logs/nicePay.log'),
  71. 'level' => 'debug',
  72. 'days' => 60,
  73. 'permission' => 0666
  74. ],
  75. 'aegPay' => [
  76. 'driver' => 'daily',
  77. 'path' => storage_path('logs/aegPay.log'),
  78. 'level' => 'debug',
  79. 'days' => 60,
  80. 'permission' => 0666
  81. ],
  82. 'RussiaPay' => [
  83. 'driver' => 'daily',
  84. 'path' => storage_path('logs/russiaPay.log'),
  85. 'level' => 'debug',
  86. 'days' => 60,
  87. 'permission' => 0666
  88. ],
  89. 'LQPay' => [
  90. 'driver' => 'daily',
  91. 'path' => storage_path('logs/LQPay.log'),
  92. 'level' => 'debug',
  93. 'days' => 60,
  94. 'permission' => 0666
  95. ],
  96. 'passPay' => [
  97. 'driver' => 'daily',
  98. 'path' => storage_path('logs/passPay.log'),
  99. 'level' => 'debug',
  100. 'days' => 7,
  101. 'permission' => 0666
  102. ],
  103. 'paySuccess' => [
  104. 'driver' => 'daily',
  105. 'path' => storage_path('logs/paySuccess.log'),
  106. 'level' => 'debug',
  107. 'days' => 7,
  108. 'permission' => 0666
  109. ],
  110. 'AppflyerEvent' => [
  111. 'driver' => 'daily',
  112. 'path' => storage_path('logs/appflyerEvent.log'),
  113. 'level' => 'debug',
  114. 'days' => 7,
  115. 'permission' => 0666
  116. ],
  117. 'adjustEvent' => [
  118. 'driver' => 'daily',
  119. 'path' => storage_path('logs/adjustEvent.log'),
  120. 'level' => 'debug',
  121. 'days' => 7,
  122. 'permission' => 0666
  123. ],
  124. 'ip' => [
  125. 'driver' => 'daily',
  126. 'path' => storage_path('logs/ip.log'),
  127. 'level' => 'debug',
  128. 'days' => 7,
  129. 'permission' => 0666
  130. ],
  131. 'invitation' => [
  132. 'driver' => 'daily',
  133. 'path' => storage_path('logs/invitation.log'),
  134. 'level' => 'debug',
  135. 'days' => 7,
  136. 'permission' => 0666
  137. ],
  138. 'daily' => [
  139. 'driver' => 'daily',
  140. 'path' => storage_path('logs/laravel.log'),
  141. 'level' => 'debug',
  142. 'days' => 30,
  143. 'permission' => 0666
  144. ],
  145. 'slack' => [
  146. 'driver' => 'slack',
  147. 'url' => env('LOG_SLACK_WEBHOOK_URL'),
  148. 'username' => 'Laravel Log',
  149. 'emoji' => ':boom:',
  150. 'level' => 'critical',
  151. ],
  152. 'stderr' => [
  153. 'driver' => 'monolog',
  154. 'handler' => StreamHandler::class,
  155. 'with' => [
  156. 'stream' => 'php://stderr',
  157. ],
  158. ],
  159. 'syslog' => [
  160. 'driver' => 'syslog',
  161. 'level' => 'debug',
  162. ],
  163. 'errorlog' => [
  164. 'driver' => 'errorlog',
  165. 'level' => 'debug',
  166. ],
  167. 'SubCommand' => [
  168. 'driver' => 'daily',
  169. 'path' => storage_path('logs/subCommand.log'),
  170. 'level' => 'debug',
  171. 'days' => 7,
  172. 'permission' => 0666
  173. ],
  174. 'benchmark' => [
  175. 'driver' => 'daily',
  176. 'path' => storage_path('logs/benchmark.log'),
  177. 'level' => 'debug',
  178. 'days' => 7,
  179. 'permission' => 0666
  180. ],
  181. 'dingding' => [
  182. 'driver' => 'monolog',
  183. 'handler' => \App\Log\TelegramHandler::class,
  184. 'handler_with' => [
  185. 'level' => Logger::ERROR,
  186. ]
  187. ],
  188. 'LQPay' => [
  189. 'driver' => 'daily',
  190. 'path' => storage_path('logs/LQPay.log'),
  191. 'level' => 'debug',
  192. 'days' => 60,
  193. 'permission' => 0666
  194. ],
  195. 'apcopay' => [
  196. 'driver' => 'daily',
  197. 'path' => config('pay.apcopay.log.file'),
  198. 'level' => config('pay.apcopay.log.level', 'debug'),
  199. 'days' => 14,
  200. ],
  201. ],
  202. ];