title: How to add serveral deletion conditions on log4j2.properties?
body: <p>We're using ElasticSearch 6.1.1</p>
  
  <p>This is the default Rolling File on log4j2.properties:</p>
  
  <pre><code>appender.rolling.type = RollingFile
  appender.rolling.name = rolling
  appender.rolling.fileName = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}.log
  appender.rolling.layout.type = PatternLayout
  appender.rolling.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] %marker%.-10000m%n
  appender.rolling.filePattern = ${sys:es.logs.base_path}${sys:file.separator}${sys:es.logs.cluster_name}-%d{yyyy-MM-dd}-%i.log.gz
  appender.rolling.policies.type = Policies
  appender.rolling.policies.time.type = TimeBasedTriggeringPolicy
  appender.rolling.policies.time.interval = 1
  appender.rolling.policies.time.modulate = true
  appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
  appender.rolling.policies.size.size = 1GB
  appender.rolling.strategy.type = DefaultRolloverStrategy
  appender.rolling.strategy.fileIndex = nomax
  appender.rolling.strategy.action.type = Delete
  appender.rolling.strategy.action.basepath = ${sys:es.logs.base_path}
  appender.rolling.strategy.action.condition.type = IfFileName
  appender.rolling.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
  appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
  **appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB**
  </code></pre>
  
  <p>There is just one Deletion condition, when the log files overcome 2GB space.</p>
  
  <p>I want to add a second optional condition, when the log files overcome 7 days old.</p>
  
  <p>I have applied next changes:</p>
  
  <pre><code>appender.rolling.strategy.action.type = Delete
  appender.rolling.strategy.action.basepath = ${sys:es.logs.base_path}
  appender.rolling.strategy.action.condition.type = IfFileName
  appender.rolling.strategy.action.condition.glob = ${sys:es.logs.cluster_name}-*
  appender.rolling.strategy.action.condition.nested_condition.type = IfAny
  appender.rolling.strategy.action.condition.nested_condition.type = IfAccumulatedFileSize
  appender.rolling.strategy.action.condition.nested_condition.exceeds = 2GB
  **appender.rolling.strategy.action.condition.nested_condition.type = IfLastModified
  appender.rolling.strategy.action.condition.nested_condition.age = 7D**
  </code></pre>
  
  <p>But I'm doing something wrong because I'm not able to get the result I want.</p>
  
  <p>Anyone could show me any example how to add two or more Deletion conditions on log4j2.properties?</p>
  
  <p>Thanks and kind regards</p>