log4j2.yml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. # 共有8个级别,按照从低到高为:ALL < TRACE < DEBUG < INFO < WARN < ERROR < FATAL < OFF
  2. Configuration:
  3. status: WARN
  4. monitorInterval: 30
  5. properties: # 定义全局变量
  6. property: # 缺省配置(用于开发环境)。其他环境需要在VM参数中指定,如下:
  7. # jvm参数:-Dlog.level.console=WARN
  8. - name: log.level.console
  9. value: WARN
  10. - name: log.path
  11. value: ./logs
  12. - name: project.name
  13. value: ibps-platform-provider
  14. - name: log.console.pattern
  15. value: "%d{ISO8601} [%5.5X{threadid}] [${project.name}] [%X{appversion}] [thrid] [%X{operation}] [%X{traceid}] [%X{spanid}] [%X{serverip}] [%X{serverport}] [%X{clientip}] [%X{url}] [%X{method}] [%X{headers}] [%X{paramters}] [%X{uid}] [%5.5level] [%-30.30C{1.}] : %m%n"
  16. - name: log.pattern
  17. value: "%d{ISO8601} %-1X{threadid} ${project.name} %-1X{appversion} thrid %-1X{operation} %-1X{traceid} %-1X{spanid} %-1X{serverip} %-1X{serverport} %-1X{clientip} %-1X{url} %-1X{method} %-1X{headers} %-1X{paramters} %-1X{uid} %level %l : %m%n"
  18. appenders:
  19. # 启动日志-输出到控制台
  20. Console:
  21. - name: CONSOLE_LOG
  22. target: SYSTEM_OUT
  23. ThresholdFilter:
  24. level: ${sys:log.level.console}
  25. onMatch: ACCEPT
  26. onMismatch: DENY
  27. PatternLayout:
  28. pattern: ${log.console.pattern}
  29. # 启动日志-输出到文件
  30. RollingFile:
  31. - name: ROLLING_FILE
  32. fileName: ${log.path}/${project.name}.log
  33. filePattern: "${log.path}/history/$${date:yyyy-MM}/${project.name}-%d{yyyy-MM-dd}-%i.log.gz"
  34. PatternLayout:
  35. pattern: ${log.pattern}
  36. Filters:
  37. # 一定要先去除不接受的日志级别,然后获取需要接受的日志级别
  38. ThresholdFilter:
  39. - level: WARN
  40. onMatch: ACCEPT
  41. onMismatch: DENY
  42. Policies:
  43. TimeBasedTriggeringPolicy: # 按天分类
  44. modulate: true
  45. interval: 1
  46. SizeBasedTriggeringPolicy:
  47. size: 100MB
  48. DefaultRolloverStrategy: # 文件最多100个
  49. max: 100
  50. Loggers:
  51. AsyncRoot:
  52. level: WARN
  53. includeLocation: true
  54. AppenderRef:
  55. - ref: CONSOLE_LOG
  56. - ref: ROLLING_FILE
  57. AsyncLogger:
  58. - name: org
  59. additivity: false
  60. includeLocation: true
  61. level: WARN
  62. AppenderRef:
  63. - ref: CONSOLE_LOG
  64. - ref: ROLLING_FILE
  65. - name: org.eclipse
  66. additivity: false
  67. includeLocation: true
  68. level: WARN
  69. AppenderRef:
  70. - ref: CONSOLE_LOG
  71. - ref: ROLLING_FILE
  72. - name: org.quartz
  73. additivity: false
  74. includeLocation: true
  75. level: WARN
  76. AppenderRef:
  77. - ref: CONSOLE_LOG
  78. - ref: ROLLING_FILE
  79. - name: org.springframework
  80. additivity: false
  81. includeLocation: true
  82. level: WARN
  83. AppenderRef:
  84. - ref: CONSOLE_LOG
  85. - ref: ROLLING_FILE
  86. - name: io.swagger.models.parameters.AbstractSerializableParameter
  87. additivity: false
  88. includeLocation: true
  89. level: WARN
  90. AppenderRef:
  91. - ref: CONSOLE_LOG
  92. - ref: ROLLING_FILE
  93. - name: org.activiti
  94. additivity: false
  95. includeLocation: true
  96. level: WARN
  97. AppenderRef:
  98. - ref: CONSOLE_LOG
  99. - ref: ROLLING_FILE
  100. - name: org.apache
  101. additivity: false
  102. includeLocation: true
  103. level: WARN
  104. AppenderRef:
  105. - ref: CONSOLE_LOG
  106. - ref: ROLLING_FILE
  107. - name: org.apache.ibatis
  108. additivity: false
  109. includeLocation: true
  110. level: WARN
  111. AppenderRef:
  112. - ref: CONSOLE_LOG
  113. - ref: ROLLING_FILE
  114. - name: java.sql
  115. additivity: false
  116. includeLocation: true
  117. level: WARN
  118. AppenderRef:
  119. - ref: CONSOLE_LOG
  120. - ref: ROLLING_FILE
  121. - name: java.sql.Statement
  122. additivity: false
  123. includeLocation: true
  124. level: WARN
  125. AppenderRef:
  126. - ref: CONSOLE_LOG
  127. - ref: ROLLING_FILE
  128. - name: java.sql.PreparedStatement
  129. additivity: false
  130. includeLocation: true
  131. level: WARN
  132. AppenderRef:
  133. - ref: CONSOLE_LOG
  134. - ref: ROLLING_FILE
  135. - name: springfox
  136. additivity: false
  137. includeLocation: true
  138. level: WARN
  139. AppenderRef:
  140. - ref: CONSOLE_LOG
  141. - ref: ROLLING_FILE
  142. - name: freemarker
  143. additivity: false
  144. includeLocation: true
  145. level: WARN
  146. AppenderRef:
  147. - ref: CONSOLE_LOG
  148. - ref: ROLLING_FILE
  149. - name: pres.lnk.springframework
  150. additivity: false
  151. includeLocation: true
  152. level: WARN
  153. AppenderRef:
  154. - ref: CONSOLE_LOG
  155. - ref: ROLLING_FILE
  156. - name: cn
  157. additivity: false
  158. includeLocation: true
  159. level: WARN
  160. AppenderRef:
  161. - ref: CONSOLE_LOG
  162. - ref: ROLLING_FILE
  163. - name: com
  164. additivity: false
  165. includeLocation: true
  166. level: WARN
  167. AppenderRef:
  168. - ref: CONSOLE_LOG
  169. - ref: ROLLING_FILE
  170. - name: com.lc
  171. additivity: false
  172. includeLocation: true
  173. level: WARN
  174. AppenderRef:
  175. - ref: CONSOLE_LOG
  176. - ref: ROLLING_FILE
  177. - name: com.lc.ibps.cloud.filter
  178. additivity: false
  179. includeLocation: true
  180. level: WARN
  181. AppenderRef:
  182. - ref: CONSOLE_LOG
  183. - ref: ROLLING_FILE
  184. - name: com.lc.ibps.base.core.util.string
  185. additivity: false
  186. includeLocation: true
  187. level: WARN
  188. AppenderRef:
  189. - ref: CONSOLE_LOG
  190. - ref: ROLLING_FILE
  191. - name: com.lc.ibps.saas.base.db.tenant.spi
  192. additivity: false
  193. includeLocation: true
  194. level: WARN
  195. AppenderRef:
  196. - ref: CONSOLE_LOG
  197. - ref: ROLLING_FILE
  198. - name: com.lc.ibps.cloud.bootstrap.IbpsApplication
  199. additivity: false
  200. includeLocation: true
  201. level: WARN
  202. AppenderRef:
  203. - ref: CONSOLE_LOG
  204. - ref: ROLLING_FILE
  205. - name: com.lc.ibps.common
  206. additivity: false
  207. includeLocation: true
  208. level: WARN
  209. AppenderRef:
  210. - ref: CONSOLE_LOG
  211. - ref: ROLLING_FILE
  212. - name: com.lc.ibps.auth
  213. additivity: false
  214. includeLocation: true
  215. level: WARN
  216. AppenderRef:
  217. - ref: CONSOLE_LOG
  218. - ref: ROLLING_FILE
  219. - name: com.lc.ibps.socket
  220. additivity: false
  221. includeLocation: true
  222. level: WARN
  223. AppenderRef:
  224. - ref: CONSOLE_LOG
  225. - ref: ROLLING_FILE
  226. - name: com.lc.ibps.register
  227. additivity: false
  228. includeLocation: true
  229. level: WARN
  230. AppenderRef:
  231. - ref: CONSOLE_LOG
  232. - ref: ROLLING_FILE
  233. - name: com.lc.ibps.org
  234. additivity: false
  235. includeLocation: true
  236. level: WARN
  237. AppenderRef:
  238. - ref: CONSOLE_LOG
  239. - ref: ROLLING_FILE
  240. - name: com.lc.ibps.base.bo
  241. additivity: false
  242. includeLocation: true
  243. level: WARN
  244. AppenderRef:
  245. - ref: CONSOLE_LOG
  246. - ref: ROLLING_FILE
  247. - name: com.lc.ibps.form
  248. additivity: false
  249. includeLocation: true
  250. level: WARN
  251. AppenderRef:
  252. - ref: CONSOLE_LOG
  253. - ref: ROLLING_FILE
  254. - name: com.lc.ibps.components.codegen
  255. additivity: false
  256. includeLocation: true
  257. level: WARN
  258. AppenderRef:
  259. - ref: CONSOLE_LOG
  260. - ref: ROLLING_FILE
  261. - name: com.lc.ibps.bpmn
  262. additivity: false
  263. includeLocation: true
  264. level: WARN
  265. AppenderRef:
  266. - ref: CONSOLE_LOG
  267. - ref: ROLLING_FILE
  268. - name: com.lc.ibps.office
  269. additivity: false
  270. includeLocation: true
  271. level: WARN
  272. AppenderRef:
  273. - ref: CONSOLE_LOG
  274. - ref: ROLLING_FILE
  275. - name: com.alibaba.druid.pool
  276. additivity: false
  277. includeLocation: true
  278. level: FATAL
  279. AppenderRef:
  280. - ref: CONSOLE_LOG
  281. - ref: ROLLING_FILE