RE: Can I use static logger and ThreadContext.Properties in asp.net project?

2007-09-19 Thread zli
The ASP.Net server executes the same code for different users in different threads. So each thread has it own username property. Change the username property in one thread will not affect the name property of another thread I have test this in the VS2005 environment, and it works.. Zhen

Can I use static logger and ThreadContext.Properties in asp.net p roject?

2007-09-19 Thread Chen, Xuguang
Dear all: I am trying to write a log wrap class in asp.net project. I want to use a static logger ,such as public static ILog log = LogManager.GetLogger(""); Then I want to use log4net.ThreadContext.Properties[Key] to set custom fields. Such as "usern

Re: AdoNetAppender and PostgreSQL

2007-09-19 Thread Nuno Rocha
Ok, got it working. More exactly, it was already working...but it wouldn't show anything in the database because the bufferSize attribute was the default one...so it would only log after 512 log entries... I added to the configuration and it showed immediately. I hope this helps someone that is

Re: AdoNetAppender and PostgreSQL

2007-09-19 Thread Nuno Rocha
Hmm, I'm using Npgsql as provider for data access. NpgsqlConnection inherits DbConnection and so forth. I've tried to put this working with the following configuration: