Short question: Is there a way in the RollingFileAppender to use the
process ID (PID) in the file name?

 

Long question: 

 

We're using log4net (1.2.10) in several ASP.Net applications. We're also
using the RollingFileAppender rolling daily, and using a static file
name, so the current log-file is "log-file.log" and past log files would
be "log-file.log.2007-08-10.log" for example. 

 

One of the things we've realized is that we need to specify the
FileAppender+MinimalLock locking model in order for this to work. The
reason is, as the ASP.Net worker processes cycle there can be two worker
processes running at the same time, the one that's starting and the one
that's ending. W/out that locking model the new process is unable to get
a lock on the file, because the old process is still running so we miss
logging.

 

What we'd like to is use the PID in the file name of the log file, that
way we know the log file names will be unique and we can get rid of the
FileAppender+MinimalLock locking and increase our logging performance.
So... is there a way in the RollingFileAppender to use the process ID
(PID) in the file name?

 

Ideas?

 

-Walden

 

-- 

Walden H Leverich III
Tech Software
(516) 627-3800 x3051

[EMAIL PROTECTED]
http://www.TechSoftInc.com
<BLOCKED::blocked::http://www.techsoftinc.com/> 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)

Reply via email to