log4j2.xml 文件
生活随笔
收集整理的這篇文章主要介紹了
log4j2.xml 文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<?xml version="1.0" encoding="UTF-8"?>
<Configuration><Appenders><Console name="STDOUT" target="SYSTEM_OUT"><PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/></Console><RollingFile name="RollingFile" fileName="logs/strutslog1.log"filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz"><PatternLayout><Pattern>%d{MM-dd-yyyy} %p %c{1.} [%t] -%M-%L- %m%n</Pattern></PatternLayout><Policies><TimeBasedTriggeringPolicy /><SizeBasedTriggeringPolicy size="1 KB"/></Policies><DefaultRolloverStrategy fileIndex="max" max="2"/></RollingFile></Appenders><Loggers><Logger name="com.opensymphony.xwork2" level="WAN"/><Logger name="org.apache.struts2" level="WAN"/><Root level="warn"><AppenderRef ref="STDOUT"/></Root></Loggers></Configuration>
?
總結
以上是生活随笔為你收集整理的log4j2.xml 文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 英国监管机构相信微软不会独占CoD
- 下一篇: “请先做自我介绍”:高手都是这样做自我介