logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cícero Raupp Rolim" <ironwo...@gmail.com>
Subject Re: Problem CF + RollingFileAppender + Flush
Date Fri, 22 Feb 2008 17:49:24 GMT
Hi Matthew!

I trying to read the content of last file of RollingAppender, but this file
keep "0" size until next file be created. I think that if we call one method
to flush data into file is one way to solve problem. Does log4net have one
method to flush information to FileAppender without call LogManager.ShutDown
()?

Thanks!

Cícero

On Fri, Feb 22, 2008 at 2:38 PM, Lee, Matthew <mlee@fhlbdm.com> wrote:

>  Does it help to set the buffer size to zero in the log4net configuration?
>
> Thanks,
>
> Matt
>
>  ------------------------------
> *From:* Cícero Raupp Rolim [mailto:ironworld@gmail.com]
> *Sent:* Friday, February 22, 2008 11:36 AM
> *To:* log4net-user@logging.apache.org
> *Subject:* Problem CF + RollingFileAppender + Flush
>
> Hi!
>
> We are developing an application for compact .NET framework 2.0. We need
> log events and view and real time. We configured the app.config file like
> presented below:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>   <log4net>
>     <appender name="RollingFileAppender" type="
> log4net.Appender.RollingFileAppender">
>       <file value="test.txt" />
>       <appendToFile value="true" />
>       <maxSizeRollBackups value="5" />
>       <maximumFileSize value="100KB" />
>       <rollingStyle value="Size" />
>       <staticLogFileName value="true" />
>       <layout type="log4net.Layout.PatternLayout">
>         <conversionPattern value="%date [%thread] %-5level %logger [%ndc]
> - %message%newline" />
>       </layout>
>     </appender>
>     <root>
>       <level value="ALL" />
>       <appender-ref ref="RollingFileAppender" />
>     </root>
>   </log4net>
> </configuration>
>
> After log some events, the file "test.txt" continues with 0 size. We need
> execute method LogManager.Shutdown() to save file with these events. Are
> there one way to log events in real time without execute
> LogManager.Shutdown()?
>
> Thank's! Sorry for my poor English.
>
> This message and any files transmitted with it are confidential and are intended solely
for the use of the individual or entity to whom they are addressed.  If you have received
this email in error, please delete the email and any files transmitted with it entirely from
your computer.
>
>
>

Mime
View raw message