logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tinhuty he" <tinh...@hotmail.com>
Subject Re: how to set property for application level
Date Sat, 10 Jun 2006 03:44:12 GMT
Thanks so much. Exactly what I want.

One more question: I have a windows form application and I want some of the 
log entries automatically appear in some area of form(for example right 
bottom of the form). what is the best way to do it?

Thanks.

= = = Original message = = =

Have you tried the GlobalContext?

--- tinhuty he <tinhuty@hotmail.com> wrote:

>How can I set a property in application level so that all logs
>produced from that application will have this property in log file, 
>including all
>logs produced from other assemblies used by this application?
>
>For example I want to all my log has an property "appname" to stored
>the value of application name. I tried to set an application name:
>ThreadContext.Properties["appname"] = "App1";
>This doesn't work as what I wanted. Some of the log entries don't
>have this property.
>
>How should I approach it?
>
>Thanks.

___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

_________________________________________________________________
Donít just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/


Mime
View raw message