logger.php 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. $formatter_array = [
  12. 'class' => Monolog\Formatter\LineFormatter::class,
  13. 'constructor' => [
  14. 'format' => null,
  15. 'dateFormat' => null,
  16. 'allowInlineLineBreaks' => true,
  17. ],
  18. ];
  19. return [
  20. 'default' => [
  21. 'handler' => [
  22. 'class' => Monolog\Handler\RotatingFileHandler::class,
  23. 'constructor' => [
  24. 'filename' => BASE_PATH . '/runtime/logs/hyperf/hyperf.log',
  25. 'level' => Monolog\Logger::DEBUG,
  26. ],
  27. ],
  28. 'formatter' => $formatter_array,
  29. ],
  30. // 记录sql日志
  31. 'sql' => [
  32. 'handler' => [
  33. 'class' => Monolog\Handler\RotatingFileHandler::class,
  34. 'constructor' => [
  35. 'filename' => BASE_PATH . '/runtime/logs/sql/sql.log',
  36. 'level' => Monolog\Logger::DEBUG,
  37. ],
  38. ],
  39. 'formatter' => $formatter_array,
  40. ],
  41. // 拉取交易列表
  42. 'getwallet' => [
  43. 'handler' => [
  44. 'class' => Monolog\Handler\RotatingFileHandler::class,
  45. 'constructor' => [
  46. 'filename' => BASE_PATH . '/runtime/logs/timing/1transitWalletInList/data.log',
  47. 'level' => Monolog\Logger::DEBUG,
  48. ],
  49. ],
  50. 'formatter' => $formatter_array,
  51. ],
  52. // 闪兑转账币
  53. 'shanduibonus' => [
  54. 'handler' => [
  55. 'class' => Monolog\Handler\RotatingFileHandler::class,
  56. 'constructor' => [
  57. 'filename' => BASE_PATH . '/runtime/logs/timing/4shanduibonus/data.log',
  58. 'level' => Monolog\Logger::DEBUG,
  59. ],
  60. ],
  61. 'formatter' => $formatter_array,
  62. ],
  63. // 拉取欧意实时汇率
  64. 'getoktrealtimerate' => [
  65. 'handler' => [
  66. 'class' => Monolog\Handler\RotatingFileHandler::class,
  67. 'constructor' => [
  68. 'filename' => BASE_PATH . '/runtime/logs/timing/9getoktrealtimerate/data.log',
  69. 'level' => Monolog\Logger::DEBUG,
  70. ],
  71. ],
  72. 'formatter' => $formatter_array,
  73. ],
  74. // 发送tg定时通知
  75. 'sendtimingtgmessage' => [
  76. 'handler' => [
  77. 'class' => Monolog\Handler\RotatingFileHandler::class,
  78. 'constructor' => [
  79. 'filename' => BASE_PATH . '/runtime/logs/timing/8sendtimingtgmessage/data.log',
  80. 'level' => Monolog\Logger::DEBUG,
  81. ],
  82. ],
  83. 'formatter' => $formatter_array,
  84. ],
  85. // 闪兑通知
  86. 'sendtransittgmessage' => [
  87. 'handler' => [
  88. 'class' => Monolog\Handler\RotatingFileHandler::class,
  89. 'constructor' => [
  90. 'filename' => BASE_PATH . '/runtime/logs/timing/7sendtransittgmessage/data.log',
  91. 'level' => Monolog\Logger::DEBUG,
  92. ],
  93. ],
  94. 'formatter' => $formatter_array,
  95. ],
  96. // 自动进货
  97. 'autostocktrx' => [
  98. 'handler' => [
  99. 'class' => Monolog\Handler\RotatingFileHandler::class,
  100. 'constructor' => [
  101. 'filename' => BASE_PATH . '/runtime/logs/timing/0autostocktrx/data.log',
  102. 'level' => Monolog\Logger::DEBUG,
  103. ],
  104. ],
  105. 'formatter' => $formatter_array,
  106. ],
  107. // 监听交易
  108. 'monitorwallet' => [
  109. 'handler' => [
  110. 'class' => Monolog\Handler\RotatingFileHandler::class,
  111. 'constructor' => [
  112. 'filename' => BASE_PATH . '/runtime/logs/timing/2monitorwallet/data.log',
  113. 'level' => Monolog\Logger::DEBUG,
  114. ],
  115. ],
  116. 'formatter' => $formatter_array,
  117. ],
  118. // 能量平台更新余额
  119. 'energyplatformbalance' => [
  120. 'handler' => [
  121. 'class' => Monolog\Handler\RotatingFileHandler::class,
  122. 'constructor' => [
  123. 'filename' => BASE_PATH . '/runtime/logs/timing/3energyplatformbalance/data.log',
  124. 'level' => Monolog\Logger::DEBUG,
  125. ],
  126. ],
  127. 'formatter' => $formatter_array,
  128. ],
  129. // 拉取能量平台钱包trx交易
  130. 'getenergywallettrxtrade' => [
  131. 'handler' => [
  132. 'class' => Monolog\Handler\RotatingFileHandler::class,
  133. 'constructor' => [
  134. 'filename' => BASE_PATH . '/runtime/logs/timing/5getenergywallettrxtrade/data.log',
  135. 'level' => Monolog\Logger::DEBUG,
  136. ],
  137. ],
  138. 'formatter' => $formatter_array,
  139. ],
  140. // 回收能量
  141. 'recoveryenergy' => [
  142. 'handler' => [
  143. 'class' => Monolog\Handler\RotatingFileHandler::class,
  144. 'constructor' => [
  145. 'filename' => BASE_PATH . '/runtime/logs/timing/5recoveryenergy/data.log',
  146. 'level' => Monolog\Logger::DEBUG,
  147. ],
  148. ],
  149. 'formatter' => $formatter_array,
  150. ],
  151. // 自动开tg会员
  152. 'tgpremium' => [
  153. 'handler' => [
  154. 'class' => Monolog\Handler\RotatingFileHandler::class,
  155. 'constructor' => [
  156. 'filename' => BASE_PATH . '/runtime/logs/timing/6tgpremium/data.log',
  157. 'level' => Monolog\Logger::DEBUG,
  158. ],
  159. ],
  160. 'formatter' => $formatter_array,
  161. ],
  162. // 取消过期为政府的会员订单
  163. 'cancelunpaidorder' => [
  164. 'handler' => [
  165. 'class' => Monolog\Handler\RotatingFileHandler::class,
  166. 'constructor' => [
  167. 'filename' => BASE_PATH . '/runtime/logs/timing/6cancelunpaidorder/data.log',
  168. 'level' => Monolog\Logger::DEBUG,
  169. ],
  170. ],
  171. 'formatter' => $formatter_array,
  172. ],
  173. // 拉去会员平台钱包usdt交易
  174. 'getpremiumwalletusdttrade' => [
  175. 'handler' => [
  176. 'class' => Monolog\Handler\RotatingFileHandler::class,
  177. 'constructor' => [
  178. 'filename' => BASE_PATH . '/runtime/logs/timing/6getpremiumwalletusdttrade/data.log',
  179. 'level' => Monolog\Logger::DEBUG,
  180. ],
  181. ],
  182. 'formatter' => $formatter_array,
  183. ],
  184. // 拉取充值钱包trx交易
  185. 'getfmswallettrxtrade' => [
  186. 'handler' => [
  187. 'class' => Monolog\Handler\RotatingFileHandler::class,
  188. 'constructor' => [
  189. 'filename' => BASE_PATH . '/runtime/logs/timing/0getfmswallettrxtrade/data.log',
  190. 'level' => Monolog\Logger::DEBUG,
  191. ],
  192. ],
  193. 'formatter' => $formatter_array,
  194. ],
  195. // 能量代理
  196. 'handleaienergyorder' => [
  197. 'handler' => [
  198. 'class' => Monolog\Handler\RotatingFileHandler::class,
  199. 'constructor' => [
  200. 'filename' => BASE_PATH . '/runtime/logs/timing/10handleaienergyorder/data.log',
  201. 'level' => Monolog\Logger::DEBUG,
  202. ],
  203. ],
  204. 'formatter' => $formatter_array,
  205. ],
  206. // 归集钱包
  207. 'handlecollectionwallet' => [
  208. 'handler' => [
  209. 'class' => Monolog\Handler\RotatingFileHandler::class,
  210. 'constructor' => [
  211. 'filename' => BASE_PATH . '/runtime/logs/timing/10handlecollectionwallet/data.log',
  212. 'level' => Monolog\Logger::DEBUG,
  213. ],
  214. ],
  215. 'formatter' => $formatter_array,
  216. ],
  217. ];