Thanks a bunch.

I would probably have to delete it after the process ends, by checking if
it's length = 0.



Radovan Raszka wrote:
> 
> Well, it is :) but some programming is needed
> See this post
> http://mail-archives.apache.org/mod_mbox/logging-log4net-user/200708.mbox/%3c2de096d91923074a82b1e17adc480ec801359...@nasa-dtw-ex004.nasa.cpwr.corp%3E
> Radovan
> 
> -----Původní zpráva-----
> Od: Stefan Bodewig [mailto:bode...@apache.org] 
> Odesláno: 13. října 2011 6:39
> Komu: Log4NET User
> Předmět: Re: How to prevent creating log file ???
> 
> 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
> 
> 

-- 
View this message in context: 
http://old.nabble.com/How-to-prevent-creating-log-file-----tp32638170p32644987.html
Sent from the Log4net - Users mailing list archive at Nabble.com.

Reply via email to