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

Viewed 160

I use WSO2 ESB 5.0.0 and 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.

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)?

Thanks.

1 Answers

You can follow this Log management documentation. 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.

Configure the following two properties for CARBON_LOGFILE appender:

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