<Appenders>
<Routing name="Routing">
<Routes pattern="$${ctx:requestId}}">
<Route>
<RollingFile name="childallog" append="true" fileName="logs/childallog.log" filePattern="logs/childallog-%i.%d{yyyy-MM-dd}.log">
<PatternLayout pattern="%d{DEFAULT} %-5p [%c] - %m%n"/>
<Policies>
<OnStartupTriggeringPolicy minSize="1" />
<SizeBasedTriggeringPolicy size="100MB" />
</Policies>
<DefaultRolloverStrategy max="3" fileIndex="min" />
</RollingFile>
</Route>
</Routes>
<IdlePurgePolicy timeToLive="1" timeUnit="minutes"/>
</Routing>
</Appenders>
<Loggers>
<Logger name="AssemblyLine.AssemblyLines/childAL" level="info">
<AppenderRef ref="Routing" />
</Logger>
</Loggers>
I have above defined log4j2.xml file. I want to achieve following->
- want to use purge.
- want to associate variable in log4j2.xml.
My server process is running one assembly line (AL) called parent.xml (http server) which then calls chilAL for every http request. Many many chilALs are getting called, which calls logger for every child process.
At present, my server process leaks memory after 4-5 days of continuous
I am expecting no memory leak.
So I want to try purge.