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?

Reply via email to