logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <m.lybar...@gmail.com>
Subject rolling daily logger
Date Fri, 06 Mar 2015 14:40:03 GMT
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

any help would be most appreciated.




    <RollingFile name=*"mlog"* fileName=
*"/home/mark/jboss-eap-6.1/standalone/log/mlog.log"* filePattern=

      <PatternLayout pattern=*"%d %-5p %X{one} %X{foo} %X{bar} %c{2} -


                <SizeBasedTriggeringPolicy size=*"50 KB"* />


        <DefaultRolloverStrategy fileIndex=*"min"* max=*"50"*/>


    <Console name=*"STDOUT"* target=*"SYSTEM_OUT"*>

      <PatternLayout pattern=*"%d %-5p %X{one} %X{foo} %X{bar} %c{2} -



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message