Your pattern is using %d which is the day of month. You want to use %i which is an integer counter.
On Tue, 21 Aug 2018 at 10:55, Arnold Morein <[email protected]> wrote: > I have an application that used to be using logback APIs and is now on > log4j2. It has several log files configured like this: > > <RollingFile > name="XYZ_LOGGER" > fileName="${logBaseDir}/${hostName}_XZY.log" > filePattern="${logBaseDir}/rotated/${hostName}_XZY.%d.log.gz" > > > <PatternLayout pattern="${patternStr}" /> > <Policies> > <OnStartupTriggeringPolicy /> > <SizeBasedTriggeringPolicy size="${maxFileSize}" /> > </Policies> > </RollingFile> > > No matter how busy the given log is (some of which are very busy) only the > last two hours of data are present in the current file. > > Is there some configuration item I have wrong? Or some buffering thing I > don't know about? > -- Matt Sicker <[email protected]>
