i'm using log4j2 for some of the filters (level and dynamic). I want my
logs to roll based on size (this makes it easy to open in vim), but also by
date (this helps organize them and I only need 1 week of logs).
here's my current configuraiton. i'm un sure how to specify a rollover
strategy that keeps 7 days worth of files with a size based triggering
policy.
any help would be most appreciated.
thanks,
-mark-
<Appenders>
<RollingFile name=*"mlog"* fileName=
*"/home/mark/jboss-eap-6.1/standalone/log/mlog.log"* filePattern=
*"/home/mark/jboss-eap-6.1/standalone/log/mlog-%d{yyyy-MM-dd}.log.%i"*>
<PatternLayout pattern=*"%d %-5p %X{one} %X{foo} %X{bar} %c{2} -
%m%n"*/>
<Policies>
<SizeBasedTriggeringPolicy size=*"50 KB"* />
</Policies>
<DefaultRolloverStrategy fileIndex=*"min"* max=*"50"*/>
</RollingFile>
<Console name=*"STDOUT"* target=*"SYSTEM_OUT"*>
<PatternLayout pattern=*"%d %-5p %X{one} %X{foo} %X{bar} %c{2} -
%m%n"*/>
</Console>
</Appenders>