Using RollingFileAppender with style=Date.

2009-11-30 Thread David Gerler
How do I make it only keep a certain number of files when using the rollingstyle = date? I've looked on the website and have not been able to find an example of anything talking about it. This is what I have now:

Customized mail subject fo SmtpAppender

2009-11-30 Thread Petite Escalope
Hello, I am using log4net for a web project and would like to make customized mail subjects my email appender. I already tried something like : * * * public static void MailInfo(string msg, string subjectDetails)* *{* *log4net.ThreadContext.Properties["mailsu

RE: webapplication logging - one log file per user

2009-11-30 Thread Walden H. Leverich
Sounds to me like a race-condition in the making. Follow the timeline: User1 Logs in Set GlobalContext = User1 Configure Log All is good. But what about: User1 Logs in Set GlobalContext = User1 User2 Logs in Set GlobalContext = User2 Configure (from first login) Log something C

Re: webapplication logging - one log file per user

2009-11-30 Thread Shekar
No. It has passed my initial test ie., POC. Let me test it thoroughly after integration and update you. Regards, Raj. On Mon, Nov 30, 2009 at 11:04 PM, Matt Lund wrote: > Be careful about using the global context… In a scenario where you have > two users logged in simultaneously wouldn’t y

RE: webapplication logging - one log file per user

2009-11-30 Thread Matt Lund
Be careful about using the global context... In a scenario where you have two users logged in simultaneously wouldn't you have problems? From: Shekar [mailto:shivaraj...@gmail.com] Sent: Monday, November 30, 2009 9:21 AM To: Log4NET User Subject: Re: webapplication logging - one log file per

Re: webapplication logging - one log file per user

2009-11-30 Thread Shekar
Well, Thanks to everyone for the suggestions. At last I got what I wanted. Following were the steps I followed: 1. Set the file name dynamically using GlobalContext [you can ThreadContext as well] property which the user who logged in. 2. Load the config file using XmlConfigurator.Configure(Conf

RE: webapplication logging - one log file per user

2009-11-30 Thread Walden H. Leverich
I understand it's not your exact requirement, but what about including the user name in each message logged, but pushing it into the NDC? We have a similar requirement to include the client name in our application, and we use a single log file (per day) but every request starts with a NDC.Push(Clie