Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2325

Half day log files rotation issue (generating only AM log)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.10.0
    • Fix Version/s: None
    • Component/s: API
    • Labels:
      None

      Description

      I want to generate half-daily log files through log4j2 configuration. 

      But i am getting only AM log files , Below is my log4j2 configuration,

      <RollingRandomAccessFile name="REQUEST_LOG" append="true" immediateFlush="false" {{fileName="${logName}" }}

      filePattern="${logName}-%d{yyyy-MM-dd-a}">
      {{ <PatternLayout pattern="%d{HH:mm:ss,SSS}[%pid:%tid] >> %m %n" />}}
      {{ <Policies>}}
      {{ <TimeBasedTriggeringPolicy interval="1" />}}
      {{ </Policies>}}
      {{ </RollingRandomAccessFile>}}

      Hourly log files are generating with below configuration ,but half daily files are not generating.

      <RollingRandomAccessFile name="ROLL" append="true" immediateFlush="false"
      {{ fileName="${logName}" filePattern="${logName}-%d{yyyy-MM-dd-HH}">}}

      <PatternLayout pattern="%-22d %-5p [%pid:%tid] [%C\{1}.%M(%L)] - %m %n" />
      {{ <Policies>}}
      {{ <TimeBasedTriggeringPolicy interval="1" />}}
      {{ </Policies>}}
      {{ </RollingRandomAccessFile>}}

      Could you please check how to generate half daily files are not generating.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sjena Sridhar Jena
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: