logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "wang junwei" <keleking...@hotmail.com>
Subject RE: utilize logging functionality in my add-in
Date Thu, 08 Feb 2007 08:42:32 GMT
Thank you Dean for your suggestion.
Now I have figured out how to get there.
Here is these steps:
1.place your separate log4net configuration whatever location take 
C:\config\log4netcfg.xml for example.
2.my add-in is an assembly which recursively references other assemblies, 
Now I can programatically configure log4net environment in add-in's default 
constructor(typically AddInName.Connect) using
3.then I can use logging function as usual in my add-in assembly.

Thanks again Dean. Hope this can help others.

>From: "Dean Fiala" <dfiala@celadonlabs.com>
>Reply-To: "Log4NET User" <log4net-user@logging.apache.org>
>To: "'Log4NET User'" <log4net-user@logging.apache.org>
>Subject: RE: utilize logging functionality in my add-in
>Date: Tue, 6 Feb 2007 13:10:39 -0500
>The only thing that is different is that the context of the library is the 
VS2005 executable and not something you have written yourself. It's been a 
while since I've worked with add-ins, but I imagine that there is a some 
sort of start up method that is called when the add-in is loaded.  What 
you'd need to here is have the method configure your logging, either 
programmitically or by using the XmlConfigurator.  The trickiest part will 
be determining the file locations for the configuration and/or output, but 
either the .NET AppDomain or Environment classes will let you know where 
the application is working and you can work from there.
>Dean Fiala
>Chief Technology Officer
>Celadon Laboratories, Inc.
>-----Original Message-----
>From: king kele [mailto:kelekingone@hotmail.com]
>Sent: Monday, February 05, 2007 12:00 AM
>To: log4net-user@logging.apache.org
>Subject: utilize logging functionality in my add-in
>I've used log4net in several project.It's good.
>But now, the problem is I want to use log4net for logging in my vs2005 
add-in, it's a class library assembly.
>Previously, I use log4net in terms of standlone application such as 
windows application, asp.net application etc. Now it's an class library.
>Anyone can tell me how to use log4net in my add-in for logging?
>Thanks in advance.
>鍏嶈垂涓嬭浇 MSN Explorer:   http://explorer.msn.com/lccn/

与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

View raw message