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("XXXX");
            Then I want to use log4net.ThreadContext.Properties[Key] to set
custom fields. Such as "username".
            But now, I am't sure if the log is safe in asp.net model?
            For example, user A login website and set
log4net.ThreadContext.Properties["username"] = "User A",
            then user B login website on another pc  and set
log4net.ThreadContext.Properties["username"] = "User B",
            Now, if user A write a log, what the username is?

            On my local pc, I run two IE, it seems to be "UserB". In other
word, it was modified by another IE application.
            According to log4net.ThreadContext document, it should work
well.
            But I am not sure if it caused by VS2005 test envirement....
         
            Thanks

            Napo ,      


Best Regards,


Reply via email to