The RollingFileAppender shouldn't be buffering by default as the default
value of the ImmediateFlush property it inherits from the TextWriterAppender
is true [1].

Could it be the case that you are observing the log entries using a "tail"
program which refreshes the log file after a period of around 20-30 log
entries?

[1]
http://logging.apache.org/log4net/release/sdk/log4net.Appender.TextWriterAppender.ImmediateFlush.html

Regards,
Chun Kit


On Mon, Oct 24, 2011 at 8:47 PM, Cook, Henri <henri.c...@itn.co.uk> wrote:

>   Morning Log4Netters!****
>
> ** **
>
> I’m a recent convert to the Log4Net way and I’ve implemented myself a
> RollingFileAppender as below – what I can’t seem to do is stop it buffering!
> I’m trying to debug a live transfer process using log entries and having it
> batch 20-30 log entries before writing them to file is a bit limiting. I’ve
> found lots of entries in Log4j documentation about a ‘bufferedIO’ flag which
> I’ve tried to set but with debugging on it says log4net can’t find it as a
> parameter. *Is anyone able to assist?*
>
> * *
>
> Thanks in advance,****
>
> ** **
>
> Henri****
>
> ** **
>
> <log4net>****
>
>     <appender name="RollingAppender" type="
> log4net.Appender.RollingFileAppender">****
>
>       <file type="log4net.Util.PatternString" value="
> C:\ITN\Logs\ITNService.log"/>****
>
>       <appendToFile value="true"/>****
>
>       <staticLogFileName value="true"/>****
>
>       <rollingStyle value="Date"/>****
>
>       <maxSizeRollBackups value="7"/>****
>
>       <datePattern value="yyyyMMdd"/>****
>
>       <layout type="log4net.Layout.PatternLayout">  ****
>
>         <conversionPattern value="%d [%t] %-5p %m%n"/>****
>
>       </layout>****
>
>     </appender>****
>
>     <logger name="Logger">****
>
>       <appender-ref ref="RollingAppender" />****
>
>     </logger>****
>
>     <root>****
>
>       <level value="DEBUG" />****
>
>       <appender-ref ref="RollingAppender" />****
>
>     </root>****
>
>   </log4net>****
>
> ** **
>
>
>
> HENRI* *COOK
> DEVELOPER
>
>  200 GRAY'S INN ROAD
> LONDON
> WC1X 8XZ
> UNITED KINGDOM
> T +44 (0)20 7430 4545
> F
> E henri.c...@itn.co.uk
> WWW.ITN.CO.UK
> P  Please consider the environment. Do you really need to print this
> email?
>
>
>
> Please Note:
>
> Any views or opinions are solely those of the author and do not necessarily
> represent those of Independent Television News Limited unless specifically
> stated. This email and any files attached are confidential and intended
> solely for the use of the individual or entity to which they are addressed.
> If you have received this email in error, please notify
> postmas...@itn.co.uk
>
> Please note that to ensure regulatory compliance and for the protection of
> our clients and business, we may monitor and read messages sent to and from
> our systems.
>
> Thank You.
>

Reply via email to