[ 
https://issues.apache.org/jira/browse/LOG4J2-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ralph Goers closed LOG4J2-2137.
-------------------------------
    Fix Version/s:     (was: 2.3)
       Resolution: Abandoned

The original reporter abandoned this. Questions by other user answered.

> SizeBasedTriggeringPolicy with DefaultRolloverStrategy is not working
> ---------------------------------------------------------------------
>
>                 Key: LOG4J2-2137
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2137
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.3
>         Environment: Linux
> IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 Linux x86-32 
> jvmxi3260-20080816_22093 (JIT enabled, AOT enabled)
>            Reporter: Ajay Pachlangia
>            Priority: Major
>              Labels: features
>
> Hi Team,
> I have used below given log4j file and expect my logs to be getting generated 
> up to size 1 MB with limit of 5 files but files are not reaching to the max 
> size and next files getting started written.
> 1048596 Dec 1 18:31 A-2017-12-01-3.log
> 449246  Dec 1 18:33 A-2017-12-01-1.log
> 1048636 Dec 1 18:32 A-2017-12-01-2.log
> 123424  Dec 1 18:33 A-2017-12-01-5.log
> 565972  Dec 1 18:33 A-2017-12-01-4.log
> 270800  Dec 1 18:33 A.log
> ---Log4j used ----
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration monitorInterval="5">
>     <Appenders>
> <RollingFile name="Online" fileName="My_Logs_Path/A.log" append="true" 
> immediateFlush="true" bufferedIO="false" 
> filePattern="My_Logs_Path/A-%d{yyyy-MM-dd}-%i.log">
>                       <PatternLayout>
>                               
> <pattern>|%-5p|%d{yyyy-MM-dd|HH:mm:ss,SSS}|%X{InterfaceId}|%X{SeqNo}|%X{Ouid} 
> %X{srch1} 
> %X{BussRef}|${sys:hostname}|${sys:ApplicationComponent}|%X{ExternalRefSend}|%m||%C{6}:%L|%t%n</pattern>
>                       </PatternLayout>
>                       <Policies>
>                               <SizeBasedTriggeringPolicy size="1 MB" />
>                       </Policies>
>                       <DefaultRolloverStrategy max="5"/>
>                       <Filters>
>                               <ThresholdFilter level="FATAL" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="ERROR" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="WARN"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="INFO"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="DEBUG" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>                                                
>                       </Filters>
>               </RollingFile>
>               
>                          <RollingFile name="abcd" 
> fileName="My_Logs_Path/B.log" append="true" immediateFlush="true" 
> bufferedIO="false" filePattern="My_Logs_Path/B-%d{yyyy-MM-dd}-%i.log">
>                       <PatternLayout>
>                               
> <pattern>|%-5p|%d{yyyy-MM-dd|HH:mm:ss,SSS}|%X{InterfaceId}|%X{SeqNo}|%X{Ouid} 
> %X{srch1} 
> %X{BussRef}|${sys:hostname}|${sys:ApplicationComponent}|%X{ExternalRefSend}|%m||%C{6}:%L|%t%n</pattern>
>                       </PatternLayout>
>                       <Policies>
>                               <SizeBasedTriggeringPolicy size="1 MB" />
>                       </Policies>
>                       <DefaultRolloverStrategy max="5"/>
>                       <Filters>
>                               <ThresholdFilter level="FATAL" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="ERROR" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="WARN"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="INFO"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="DEBUG" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>                                                
>                       </Filters>
>               </RollingFile>
>          <RollingFile name="efgh" fileName="My_Logs_Path/C.log" append="true" 
> immediateFlush="true" bufferedIO="false" 
> filePattern="My_Logs_Path/C-%d{yyyy-MM-dd}-%i.log">
>                       <PatternLayout>
>                               
> <pattern>|%-5p|%d{yyyy-MM-dd|HH:mm:ss,SSS}|%X{InterfaceId}|%X{SeqNo}|%X{Ouid} 
> %X{srch1} 
> %X{BussRef}|${sys:hostname}|${sys:ApplicationComponent}|%X{ExternalRefSend}|%m||%C{6}:%L|%t%n</pattern>
>                       </PatternLayout>
>                       <Policies>
>                               <SizeBasedTriggeringPolicy size="1 MB" />
>                       </Policies>
>                       <DefaultRolloverStrategy max="5"/>
>                       <Filters>
>                               <ThresholdFilter level="FATAL" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="ERROR" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="WARN"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="INFO"  onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>
>                               <ThresholdFilter level="DEBUG" onMatch="ACCEPT" 
>   onMismatch="NEUTRAL"/>                                                
>                       </Filters>
>               </RollingFile>
>               
>               <RollingFile name="CHANNEL_STATUS" 
> fileName="My_Logs_Path/D.log" append="true" immediateFlush="true" 
> bufferedIO="false" filePattern="My_Logs_Path/D-%d{yyyy-MM-dd}-%i.log">
>                       <PatternLayout>
>                               
> <pattern>|%-5p|%d{yyyy-MM-dd|HH:mm:ss,SSS}|${sys:hostname}|${sys:ApplicationComponent}|%m||%C{6}:%L|%t%n</pattern>
>                       </PatternLayout>
>                       <Policies>
>                               <SizeBasedTriggeringPolicy size="1 MB" />
>                       </Policies>
>                       <DefaultRolloverStrategy max="5"/>
>               </RollingFile>
> </Appenders>
> <loggers>
>     <logger name="TTTT" level="DEBUG">
>               <appender-ref ref="Online"  level="DEBUG"/>
>       </logger>
>     <logger name="AAAA" level="DEBUG">
>               <appender-ref ref="abcd"  level="DEBUG"/>
>       </logger>
>       <logger name="BBBB" level="DEBUG" additivity="false">
>               <appender-ref ref="efgh"/>
>       </logger>
>       <logger name="CHANNEL_LOGGER" level="DEBUG" additivity="false">
>               <appender-ref ref="CHANNEL_STATUS" level="DEBUG"/>
>       </logger>
>       <logger name="org.springframework" level="OFF">
>       </logger>
> </loggers>
> </Configuration>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to