[英]How to disable logging application logs in server.log file in Wildfly 8.2.0
[英]how to configure wildfly server.log to have a fixed size and rotate daily and keep only logs for 5 days.?
來自standalone.xml的片段,
**以下配置未產生結果。
<file relative-to="jboss.server.log" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<rotate-size value="500m"/>
<append value="true"/>
<max-backup-index value="5"/>
使用suffix
屬性時, periodic-size-rotating-file-handler
不會清除備份。 請參閱Wildscribe 文檔。 這已被請求,但沒有真正的好方法來確定需要清除哪些文件。
您可能需要直接在standalone.xml
中使用旋轉文件處理程序,如下所示:
<profile>
<subsystem xmlns="urn:jboss:domain:logging:3.0">
<periodic-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-rotating-file-handler>
</subsystem>
</profile>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.