I am using WSO2 APIM 3.2.0
and WSO2 IS 5.11.0
.
I have logs in directory ${sys:carbon.home}/repository/logs/
I could manage the log growth by removing the older files more than 30 days by adding the below configuration in ${sys:carbon.home}/repository/conf/log4j2.properties
appender.ERROR_LOGFILE.strategy.action.type = Delete
appender.ERROR_LOGFILE.strategy.action.basepath =
${sys:carbon.home}/repository/logs/
appender.ERROR_LOGFILE.strategy.action.maxdepth = 1
appender.ERROR_LOGFILE.strategy.action.condition.type = IfLastModified
appender.ERROR_LOGFILE.strategy.action.condition.age = 30D
appender.ERROR_LOGFILE.strategy.action.PathConditions.type = IfFileName
appender.ERROR_LOGFILE.strategy.action.PathConditions.glob = wso2-apigw-errors-*
I can do the same for wso2carbon, audit logs but the log4j2.properties has no support for http_access logs.
In ${sys:carbon.home}/repository/conf/tomcat/catalina-server.xml
, AccessLogValve has control for http_access logs.
I am not sure how to remove the older logs using this XML file. Can someone let me know how it can be done?