logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: How to prevent creating log file ???
Date Thu, 13 Oct 2011 04:39:14 GMT
On 2011-10-12, Sigourney_Weaver wrote:

> Hi Stefan,

> Thank you, but it didnt work :(

> For the second appender I specified: <lockingModel
> type="log4net.Appender.FileAppender+MinimalLock" />

> http://old.nabble.com/file/p32639452/20111012115258.png

> but it still creates the empty log file (and I dont log any FATAL errors).

Yes, my fault.  I overlooked that FileAppender.OpenFile acquires the
lock before calling SetQWForFiles (not sure it needs a lock there, will
investigate) and once again in order to write the header.

So no, there is no way with the current FileAppender to avoid the empty
files.

Stefan

Mime
View raw message