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

Pierrick HYMBERT updated LOG4J2-1086:
-------------------------------------
    Attachment: LOG4J2-1086.Test.patch

Hello [[email protected]] and team,

I am not sure this is the correct way to reproduce and what is the acceptable 
size overload in log files: one log event ?

With this unit test, more thread you add, bigger files you got at the end, with 
32 threads on Windows I got 5248 bytes log instead of 2048.

I have also disabled {{log4j2.enable.direct.encoders}}, because it looks it 
didnt call {{RollingFileAppender.append}} method directly but the problem 
persist.

I didnt find correct place to fix or move {{RollingFileAppender.checkRollover}} 
method, it seems to be called to early.

> SizeBasedTriggeringPolicy is not working properly
> -------------------------------------------------
>
>                 Key: LOG4J2-1086
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1086
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 2.3, 2.4.1
>         Environment: Windows 7 OS Websphere 8.5.5.6
>            Reporter: Sharat
>            Assignee: Ralph Goers
>            Priority: Minor
>              Labels: features
>         Attachments: LOG4J2-1086.Test.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> {code}
> <?xml version="1.0" encoding="UTF-8"?>
> <Configuration>
> <Appenders> 
>               <RollingFile name="RollingFile" fileName="/logs/test.log" 
>                       filePattern="/logs/test-%i.log"> 
>                       <PatternLayout> 
>                               <pattern>%d %-5p %class{36} (%M:%L) 
> -%msg%xEx%n</pattern> 
>                       </PatternLayout> 
>                       <Policies> 
>                               <SizeBasedTriggeringPolicy size="2 KB" />
>                       </Policies>
>                       <DefaultRolloverStrategy max="5"/> 
>               </RollingFile> 
>               <Console name="console" target="SYSTEM_OUT"> 
>                       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level 
> %logger{36} - %msg%n"/> 
>               </Console> 
>       </Appenders> 
>       <Loggers>
>           <root level="trace">
>                 <appender-ref ref="RollingFile"/> 
>             <appender-ref ref="console"/>
>           </root>
>       </Loggers>
> </Configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to