jboss - JBOSS 6.3 访问日志自动删除
问题描述
我正在 JBOSS EAP 6.3 中寻找自动删除访问日志的解决方案。我添加了以下配置以将访问日志打印在不同的文件中,但它没有任何参数可以在特定时间间隔后删除文件。
<access-log pattern="%h %l %u %t %r %s %b %S %T" prefix="access_log_" rotate="true">
<directory path="." />
</access-log>
解决方案
In standalone.xml , you can have log handler configuration based on the size.
<size-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<rotate-size value="1M"/>
<max-backup-index value="1"/>
<append value="true"/>
</size-rotating-file-handler>
推荐阅读
- spring - oracle(Spring)中的动态“喜欢”
- graphql - 带有“gatsby-source-sanity”的图像资产上缺少“固定”和“流动”字段
- python - Python多线程 - 功能未完成
- javascript - 如何在 PHP 中将 MediaRecorder 流保存到 OGG 文件?包括元数据
- javascript - 反应客户端不会跟随重定向CORS localhost
- vim - 防止使用 B 或 b 跳转到 vim 中的上一行
- python - 在实现“if”条件时,得到一个 errr-float 对象没有属性“mean”
- wordpress - 如何通过 wocomerce api nodejs 创建默认变体
- python - Jupyter Qtconsole 集成到 Geany
- python - 重命名目录中所有 Excel 文件中的工作表