logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Grabowski <rongrabow...@yahoo.com>
Subject Re: log4net and IIS problems
Date Thu, 28 Feb 2008 17:54:37 GMT
I thought there was something like this already in place but I checked just now and the LockingModelBase
classes don't have any retry code; they try once then error if the file can't be opened. It
would be useful to allow for a defined set of open attempts at defined intervals on FileAppender
derived classes. This is locking model specific and not LockingStream specific because LockingStream
delegates the opening of files to a locking mode. Adding the retry code would also give us
an opportunity to move the duplicate impersonation code out of each of the LockingModelBase
inheritors and into LockingModelBase.

----- Original Message ----
From: Morten Andersen <morten@vianett.no>
To: Log4NET User <log4net-user@logging.apache.org>
Sent: Thursday, February 28, 2008 5:07:43 AM
Subject: RE: log4net and IIS problems

 _filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", "sans-serif";}
a:link, span.MsoHyperlink
a:visited, span.MsoHyperlinkFollowed
p.msochpdefault, li.msochpdefault, div.msochpdefault
	{margin-right:0cm;margin-left:0cm;font-size:10.0pt;font-family:"Times New Roman", "serif";}
	{font-family:"Calibri", "sans-serif";color:windowtext;}
	{font-family:"Calibri", "sans-serif";color:#1F497D;}
	{font-family:"Calibri", "sans-serif";color:#1F497D;}
 _filtered {margin:70.85pt 70.85pt 70.85pt 70.85pt;}
Would it be possible
to add some retry mechanism to the appender? If the appender fails to open the
file it may try again after x seconds. Some log data may be lost but for me
this is ok as long as it works most of the time. 
 Fra: Ron Grabowski[mailto:rongrabowski@yahoo.com] 
Sendt: 28. februar 2008 00:39
Til: Log4NET User
Emne: Re: log4net and IIS problems

 Didn't quite finish my
thought...I meant to say that we could add an EventLogErrorHandler to catch
edge cases like this. To address the underlying problem, someone posted some
code to the control inter-process/AppDomain locking using a Mutext. My concern
is what happens if the terminal AppDomain requests the Mutex then is forceably
killed? According the Mutex docs on MSDN an Exception will be thrown when the
new AppDomains attempts to open that Mutext.

View raw message