简体   繁体   English

如何自动删除 WSO2 ESB 和 EI 中的旧日志文件?

[英]How can I automatically delete old log files in WSO2 ESB and EI?

I use WSO2 ESB 5.0.0 and WSO2 EI 6.6.0.我使用 WSO2 ESB 5.0.0 和 WSO2 EI 6.6.0。 The WSO2 carbon generates a lot of wso2carbon.log log files daily and they eat up a lot of server hard disc space over time. WSO2 carbon 每天会生成大量 wso2carbon.log 日志文件,随着时间的推移它们会占用大量服务器硬盘空间。

How can I set/configure WSO2 ESB 5.0.0 and WSO2 EI 6.6.0 so that it automatically deletes log files after a certain period of time (for example, after 1 month)?如何设置/配置 WSO2 ESB 5.0.0 和 WSO2 EI 6.6.0 以便在一段时间后(例如,1 个月后)自动删除日志文件?

Thanks.谢谢。

You can follow this Log management documentation.您可以遵循此日志管理文档。 https://docs.wso2.com/display/EI660/Managing+Log+Growth https://docs.wso2.com/display/EI660/Managing+Log+Growth

You can limit the size of the /repository/logs/wso2carbon.log file by following the steps given below.您可以按照以下步骤限制 /repository/logs/wso2carbon.log 文件的大小。

Configure the following two properties for CARBON_LOGFILE appender:为 CARBON_LOGFILE appender 配置以下两个属性:

appender.CARBON_LOGFILE.policies.size.size=10MB
appender.CARBON_LOGFILE.strategy.max = 20

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM