Has anyone worked out a way to use a RollingFileAppender with PIDs in
filenames? What I would like to do is to ensure we never have more than 10MB
of logs, but also to have the PID in the filename to get around
ASP.NETlocking issues, and to allow multiple websites to be installed
from the same
dire
ROTECTED]
Sent: Tuesday, October 09, 2007 10:31 AM
To: Log4NET User
Subject: Re: Including PID in log file name -- Locking Models & ASP.Net
Try this..
-Peter
On 10/9/07, Walden H. Leverich <[EMAIL PROTECTED] > wrote:
Short question: Is
Try this..
-Peter
On 10/9/07, Walden H. Leverich <[EMAIL PROTECTED]> wrote:
>
> 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 s
You could simply grab the PID in your .Net code, and then use the
NDC.Push to push it onto the stack. It will then be available for
logging.
pid = GetPID(); <-- you need to write some code to actually get the PID
using(NDC.Push("pid"))
{
... all log calls will have your pid included ...