(FYI I have already searched a lot of documents on the Internet. I am using storm-0.10.0-beta1. The log4j2 configuration file in Storm is worker.xml)
Now I'm trying to use log4j2.
I am looking for a way to delete old logs, but I cannot figure it out. Part of the configuration is similar to below.
<RollingFile name="SERVICE_APPENDER" fileName="${sys:storm.home}/logs/${sys:logfile.name}.service" filePattern="${sys:storm.home}/logs/${sys:logfile.name}.service.%d{yyyyMMdd}"> <PatternLayout> <pattern>${pattern}</pattern> </PatternLayout> <Policies> <TimeBasedTriggeringPolicy interval="1" modulate="true"/> </Policies> <DefaultRolloverStrategy max="9"/> </RollingFile>
At first, I expected log files older than 3 days to be deleted.
But actually it is not.
So, I am wondering if there is a way to delete old logs or not.
If there is a way that I have not caught yet, let me know.
source share