Hi Ron,

I think your suggestion could probably work.  I'll let you know!

Regards,
Sean

On 6/21/06, Ron Grabowski < [EMAIL PROTECTED]> wrote:
Could you post what you want the log4net config file to look like?

Will this work:

XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.Combine(
  AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
  String.Format("log4net.{0}.config", Environment.MachineName ))));

--- Sean Carlin <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I am wondering if any thought has been given to coding log4net in
> such a way
> that the configuration settings can be on a per-machine basis within
> a
> single .config file?  Internally, my company has created a framework
> that
> localizes all application settings so that the production, staging,
> integration and developer workstations are all running different
> settings.
> The settings are all configured from within the main .config file for
> each
> application.  It appears that the way that log4net is currently
> setup, you
> would have to programmatically change database connection strings,
> email
> addresses, etc for the different appenders depending on machine (or
> else
> have a Log4Net.config file for each environment.
>
> I am running log4net v1.2.10 on Microsoft .NET v2 in a website
> project using
> the .dll version.
>
> Regards,
> Sean
>


Reply via email to