Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 23024 invoked from network); 15 Jul 2009 21:19:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Jul 2009 21:19:15 -0000 Received: (qmail 32253 invoked by uid 500); 15 Jul 2009 21:19:24 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 32196 invoked by uid 500); 15 Jul 2009 21:19:24 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 32187 invoked by uid 99); 15 Jul 2009 21:19:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jul 2009 21:19:24 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.79.224.5] (HELO nysrv30.fftw.com) (199.79.224.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jul 2009 21:19:15 +0000 Received: from nymail1.fftw.com (nysrv62.fftw.com) by nysrv30.fftw.com (Clearswift SMTPRS 5.2.9) with ESMTP id for ; Wed, 15 Jul 2009 17:18:54 -0400 In-Reply-To: To: "Log4NET User" Subject: Re: log4net within Excel RTD/UDF MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.5.5 November 30, 2005 Message-ID: From: MFranz@FFTW.COM Date: Wed, 15 Jul 2009 17:16:49 -0400 X-MIMETrack: Serialize by Router on NYMAIL1/FFTW(Release 8.0.1|February 07, 2008) at 07/15/2009 05:16:49 PM, Serialize complete at 07/15/2009 05:16:49 PM Content-Type: multipart/alternative; boundary="=_alternative 0074EFA8852575F4_=" X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. --=_alternative 0074EFA8852575F4_= Content-Type: text/plain; charset="US-ASCII" Brian, Yes, that is what I meant by manually. I have not looked at log4net code, but I wonder if the attribute can be enhanced to use the different base directories. Thanks for looking. Michael Brian Browning 07/15/2009 05:04 PM Please respond to "Log4NET User" To Log4NET User cc Subject Re: log4net within Excel RTD/UDF Hi Michael, I believe the easiest way to do that is to to call XmlConfigurator.Configure with the FileInfo object for your desired file. Is that what you meant when you said you were manually loading the configuration? If so, I apologize but I think that may be the best you can do. On Wed, Jul 15, 2009 at 3:36 PM, wrote: Hi, I am using C# to write an Excel RTD (real-time data) and UDF (user defined function) and having trouble figuring out how I can get log4net to configure itself. My understanding is that it uses the AppDomain.CurrentDomain.BaseDirectory to look for the configuration file. This is the Excel installation directory. I however do not install my application into that directory and do not put any configuration there. My code is installed into its' own directory which can be found by using Assembly.GetExecutingAssembly().CodeBase within my code. Is there an easy way to have log4net use a different directory when searching for the configuration file? I have had success manually loading the configuration, but this forces me to put my loading logic into all of the potential entry points. I can have multiple RTDs and UDFs defined within one assembly. So I am looking for an easy way to have one place to worry about the configuration loading. thanks Michael ******************************************************************************* This e-mail message is intended solely for the use of the addressee. The message may contain information that is privileged and confidential. Disclosure to anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail(including the original message with your reply) and then delete and discard all copies of the message. We have taken precautions to minimize the risk of transmitting software viruses but nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by software viruses. ******************************************************************************* --=_alternative 0074EFA8852575F4_= Content-Type: text/html; charset="US-ASCII"
Brian,

Yes, that is what I meant by manually.

I have not looked at log4net code, but I wonder if the attribute can be enhanced to use the different base directories.

Thanks for looking.

Michael


Brian Browning <bwbrowning@gmail.com>

07/15/2009 05:04 PM
Please respond to
"Log4NET User" <log4net-user@logging.apache.org>

To
Log4NET User <log4net-user@logging.apache.org>
cc
Subject
Re: log4net within Excel RTD/UDF




Hi Michael,

I believe the easiest way to do that is to to call XmlConfigurator.Configure with the FileInfo object for your desired file.
Is that what you meant when you said you were manually loading the configuration?
If so, I apologize but I think that may be the best you can do.


On Wed, Jul 15, 2009 at 3:36 PM, <MFranz@fftw.com> wrote:

Hi,


I am using C# to write an Excel RTD (real-time data) and UDF (user defined function) and having trouble figuring out how I can get log4net to configure itself.  My understanding is that it uses the AppDomain.CurrentDomain.BaseDirectory to look for the configuration file.  This is the Excel installation directory.  I however do not install my application into that directory and do not put any configuration there.  My code is installed into its' own directory which can be found by using Assembly.GetExecutingAssembly().CodeBase within my code.  Is there an easy way to have log4net use a different directory when searching for the configuration file?


I have had success manually loading the configuration, but this forces me to put my loading logic into all of the potential entry points.  I can have multiple RTDs and UDFs defined within one assembly.  So I am looking for an easy way to have one place to worry about the configuration loading.


thanks


Michael


*******************************************************************************
This e-mail message is intended solely for the use of the addressee.
The message may contain information that is privileged and
confidential.
Disclosure to anyone other than the intended recipient is prohibited.
If you are not the intended recipient, please do not disseminate,
distribute or copy this communication, by e-mail or otherwise. Instead,
please notify us immediately by return e-mail(including the original
message with your reply) and then delete and discard all copies of the
message. We have taken precautions to minimize the risk of transmitting
software viruses but nevertheless advise you to carry out your own
virus checks on any attachment to this message. We accept
no liability for any loss or damage caused by software viruses.
*******************************************************************************

 

--=_alternative 0074EFA8852575F4_=--